Clickonce application wont install - c#

I am having winform application which is deployed with ClickOnce publisher.
I publish my application to local PC, then transfer files (setup, manifest and version folder from Application Files folder inside) to my Windows Server 2003 and then there I start setup.
I have deployed 168 versions of it and it worked normally but today it stopped working.
What I mean by that is when I start SETUP it just starts it and nothing happens.
I have started TASK MANAGER and inside It I see MyApplicationName.exe starts but also what I see is Dw20.exe (if it is important).
I have tried publishing another time (new version) but same happens.
Since it is not starting from setup file I went to Application Files/1_0_0_X and started manifest file from there and then error window appears which says:
Application download didn't succeed....
and in Details.. I have this log:
PLATFORM VERSION INFO
Windows : 5.2.3790.131072 (Win32NT)
Common Language Runtime : 4.0.30319.1
System.Deployment.dll : 4.0.30319.1 (RTMRel.030319-0100)
clr.dll : 4.0.30319.1 (RTMRel.030319-0100)
dfdll.dll : 4.0.30319.1 (RTMRel.030319-0100)
dfshim.dll : 4.0.31106.0 (Main.031106-0000)
SOURCES
Deployment url : file:///C:/Program%20Files/Magacin/Application%20Files/Magacin_1_0_0_170/Magacin.application
Deployment Provider url : http://desktop-i40i5hu/Magacin/Magacin.application
ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of C:\Program Files\Magacin\Application Files\Magacin_1_0_0_170\Magacin.application resulted in exception. Following failure messages were detected:
+ Downloading http://desktop-i40i5hu/Magacin/Magacin.application did not succeed.
+ The remote name could not be resolved: 'desktop-i40i5hu'
COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.
WARNINGS
There were no warnings during this operation.
OPERATION PROGRESS STATUS
* [20.09.2018 15:20:10] : Activation of C:\Program Files\Magacin\Application Files\Magacin_1_0_0_170\Magacin.application has started.
ERROR DETAILS
Following errors were detected during this operation.
* [20.09.2018 15:20:13] System.Deployment.Application.DeploymentDownloadException (Unknown subtype)
- Downloading http://desktop-i40i5hu/Magacin/Magacin.application did not succeed.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
at System.Deployment.Application.SystemNetDownloader.DownloadAllFiles()
at System.Deployment.Application.FileDownloader.Download(SubscriptionState subState)
at System.Deployment.Application.DownloadManager.DownloadManifestAsRawFile(Uri& sourceUri, String targetPath, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation)
at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestDirect(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation)
at System.Deployment.Application.DownloadManager.FollowDeploymentProviderUri(SubscriptionStore subStore, AssemblyManifest& deployment, Uri& sourceUri, TempFile& tempFile, IDownloadNotification notification, DownloadOptions options)
at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestBypass(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState, IDownloadNotification notification, DownloadOptions options)
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
--- Inner Exception ---
System.Net.WebException
- The remote name could not be resolved: 'desktop-i40i5hu'
- Source: System
- Stack trace:
at System.Net.HttpWebRequest.GetResponse()
at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
COMPONENT STORE TRANSACTION DETAILS
No transaction information is available.
Since I saw this message The remote name could not be resolved: 'desktop-i40i5hu' I went to check which PC is desktop-i40i5hu and I came up that it is my local pc (One that I am developing app in) so I thought that is problem BUT when I went to manifest file from 30 versions ago, it has same configuration and it is also mentioned this pc name and it worked normally.
What could possibly be the problem here?
My manifest file:
<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xrml="urn:mpeg:mpeg21:2003:01-REL-R-NS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1" xmlns:co.v2="urn:schemas-microsoft-com:clickonce.v2">
<assemblyIdentity name="Magacin.application" version="1.0.0.171" publicKeyToken="7c841f97b6f4e6dd" language="neutral" processorArchitecture="msil" xmlns="urn:schemas-microsoft-com:asm.v1" />
<description asmv2:publisher="Magacin" asmv2:product="Magacin" xmlns="urn:schemas-microsoft-com:asm.v1" />
<deployment install="true" mapFileExtensions="true">
<deploymentProvider codebase="http://desktop-i40i5hu/Magacin/Magacin.application" />
</deployment>
<compatibleFrameworks xmlns="urn:schemas-microsoft-com:clickonce.v2">
<framework targetVersion="4.0" profile="Full" supportedRuntime="4.0.30319" />
</compatibleFrameworks>
<dependency>
<dependentAssembly dependencyType="install" codebase="Application Files\Magacin_1_0_0_171\Magacin.exe.manifest" size="17270">
<assemblyIdentity name="Magacin.exe" version="1.0.0.171" publicKeyToken="7c841f97b6f4e6dd" language="neutral" processorArchitecture="msil" type="win32" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>rAGYfZ9qSVQRPuG5wA0Z5LpiXiw=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
<publisherIdentity name="CN=DESKTOP-1VBU9II\arist" issuerKeyHash="fe4200ba8b6dbe28648e23c775f06fa5ae24f327" /><Signature Id="StrongNameSignature" xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" /><Reference URI=""><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /><Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /><DigestValue>2qtxvGAyieS+/aFm11SpiFuvfB8=</DigestValue></Reference></SignedInfo><SignatureValue>EEW8FQAdOEK8gnSfzfwKxbbEUpRxF2bQ1g0zAQZqfzUNHYYbYfFuuJSaQG/H0/eQrwTm+ZkTgbzHaEQ9Ws/nHH+HnXRLP8JaL3VQKfZJCgqZgR4by2y/ShqWR529f+QkuHFgWgZa5HbJoqg0Qbudn+tBltHIFgDGQfGHMVFWiEo=</SignatureValue><KeyInfo Id="StrongNameKeyInfo"><KeyValue><RSAKeyValue><Modulus>1UHNMvkLBxDsocHDOsb0/lpgXi0zrit5zD9an7vz5uuwDbG4n6j0BBJVi6oaUHBEB1QxL4DfirBbeJUpE5+pmswg/ybnFjD2l2VE93J6IMyyAiWx5RqNfrf0e0IuaspmgMoEi2MScmHKu+H5We0ECBhMyB6S+JvVvF4LFBgFcEk=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue></KeyValue><msrel:RelData xmlns:msrel="http://schemas.microsoft.com/windows/rel/2005/reldata"><r:license xmlns:r="urn:mpeg:mpeg21:2003:01-REL-R-NS" xmlns:as="http://schemas.microsoft.com/windows/pki/2005/Authenticode"><r:grant><as:ManifestInformation Hash="1f7caf5b88a954d766a1fdbee4893260bc71abda" Description="" Url=""><as:assemblyIdentity name="Magacin.application" version="1.0.0.171" publicKeyToken="7c841f97b6f4e6dd" language="neutral" processorArchitecture="msil" xmlns="urn:schemas-microsoft-com:asm.v1" /></as:ManifestInformation><as:SignedBy /><as:AuthenticodePublisher><as:X509SubjectName>CN=DESKTOP-1VBU9II\arist</as:X509SubjectName></as:AuthenticodePublisher></r:grant><r:issuer><Signature Id="AuthenticodeSignature" xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" /><Reference URI=""><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /><Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /><DigestValue>B+tpk5gCS54I1V73fzPct5OPdDU=</DigestValue></Reference></SignedInfo><SignatureValue>gRIzJFslS3kwWhE2ttwVhI6Sp6GZpQ18GaVXlk8P8fcLsnPfUWkIG+hUZ2/bEhaXHa54n6+Eloaqf5we64r0zvqL+k6DGZp+u6kXVGmoVN7myvLC+9RER+KvDhaGoCqQRZakGsQALzH9R8Abb3wavGVqiY+GWdWwtBTyY37jCpc=</SignatureValue><KeyInfo><KeyValue><RSAKeyValue><Modulus>1UHNMvkLBxDsocHDOsb0/lpgXi0zrit5zD9an7vz5uuwDbG4n6j0BBJVi6oaUHBEB1QxL4DfirBbeJUpE5+pmswg/ybnFjD2l2VE93J6IMyyAiWx5RqNfrf0e0IuaspmgMoEi2MScmHKu+H5We0ECBhMyB6S+JvVvF4LFBgFcEk=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue></KeyValue><X509Data><X509Certificate>MIIB7TCCAVagAwIBAgIQNo9sFB5oMLdIxe2hijch8zANBgkqhkiG9w0BAQUFADA1MTMwMQYDVQQDHioARABFAFMASwBUAE8AUAAtADEAVgBCAFUAOQBJAEkAXABhAHIAaQBzAHQwHhcNMTcxMjEyMTY1NzA1WhcNMTgxMjEyMjI1NzA1WjA1MTMwMQYDVQQDHioARABFAFMASwBUAE8AUAAtADEAVgBCAFUAOQBJAEkAXABhAHIAaQBzAHQwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANVBzTL5CwcQ7KHBwzrG9P5aYF4tM64recw/Wp+78+brsA2xuJ+o9AQSVYuqGlBwRAdUMS+A34qwW3iVKROfqZrMIP8m5xYw9pdlRPdyeiDMsgIlseUajX639HtCLmrKZoDKBItjEnJhyrvh+VntBAgYTMgekvib1bxeCxQYBXBJAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEANvRVpqrbhZSSrEOTTNq0DLXsn+l5q5XWrFqHUX1C9bNvYGiDEehp504nJKSd5fZSmHrUfALiJ1bDox/VUzL7AvIGsIMw2+ysbffsoLJTTntWY0dag5YkGzn16DtWScvT1sBiZ0h6q9qPVuprBCMOjMK2SEKeLGsIIaw7h10ZjvQ=</X509Certificate></X509Data></KeyInfo></Signature></r:issuer></r:license></msrel:RelData></KeyInfo></Signature></asmv1:assembly>
Looks like problem isn't this.
I have commented sections of my code to see where is it making problem and came up that this started making problem:
ServicePointManager.Expect100Continue = true;
ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072;
I do not know why but I will as other question for this.

Related

Microsoft.Data.Services version issue while running WCF Data Services

I am getting the following error:
Could not load file or assembly 'Microsoft.Data.Services, Version=5.6.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
But when I go and check my Packages.config:
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="2.0.1" targetFramework="net472" />
<package id="Microsoft.Data.Edm" version="5.6.4" targetFramework="net472" />
<package id="Microsoft.Data.OData" version="5.6.4" targetFramework="net472" />
<package id="Microsoft.Data.Services" version="5.6.4" targetFramework="net472" />
<package id="Microsoft.Data.Services.Client" version="5.6.4" targetFramework="net472" />
<package id="Microsoft.OData.EntityFrameworkProvider" version="1.0.0-beta2" targetFramework="net472" />
<package id="System.Spatial" version="5.6.4" targetFramework="net472" />
</packages>
It showing me above file, Do I need to change the version ? If yes then how I can change it? I tried through nugget it didn't work.
I checked in my C:\Program Files\Microsoft SDKs\Azure\.NET SDK\v2.9\bin\plugins\Diagnostics there are 5.6.2 version dlls are there, I replaced them with 5.6.4 but still getting the same error.
Update:
I updated below in my web.config:
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.Data.Services" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.6.2.0" newVersion="5.6.4.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<system.web>
<compilation debug="true" targetFramework="4.7.2" />
<httpRuntime targetFramework="4.7.2" />
</system.web>
It changes the output to:
Log showing me below issues:
Model1.ssdl(2,2) : error 0152: No Entity Framework provider found for the ADO.NET provider with invariant name 'System.Data.SqlClient'. Make sure the provider is registered in the 'entityFramework' section of the application config file. See http://go.microsoft.com/fwlink/?LinkId=260882 for more information.
at System.Data.Entity.Core.Metadata.Edm.StoreItemCollection.Loader.ThrowOnNonWarningErrors()
at System.Data.Entity.Core.Metadata.Edm.StoreItemCollection.Loader.LoadItems(IEnumerable`1 xmlReaders, IEnumerable`1 sourceFilePaths)
at System.Data.Entity.Core.Metadata.Edm.StoreItemCollection.Loader..ctor(IEnumerable`1 xmlReaders, IEnumerable`1 sourceFilePaths, Boolean throwOnError, IDbDependencyResolver resolver)
at System.Data.Entity.Core.Metadata.Edm.StoreItemCollection.Init(IEnumerable`1 xmlReaders, IEnumerable`1 filePaths, Boolean throwOnError, IDbDependencyResolver resolver, DbProviderManifest&amp; providerManifest, DbProviderFactory&amp; providerFactory, String&amp; providerInvariantName, String&amp; providerManifestToken, Memoizer`2&amp; cachedCTypeFunction)
at System.Data.Entity.Core.Metadata.Edm.StoreItemCollection..ctor(IEnumerable`1 xmlReaders, IEnumerable`1 filePaths)
at System.Data.Entity.Core.Metadata.Edm.MetadataCache.LoadStoreCollection(EdmItemCollection edmItemCollection, MetadataArtifactLoader loader)
at System.Data.Entity.Core.Metadata.Edm.MetadataCache.&lt;&gt;c__DisplayClass5.&lt;&gt;c__DisplayClass7.&lt;GetMetadataWorkspace&gt;b__1()
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at System.Lazy`1.get_Value()
at System.Data.Entity.Core.Metadata.Edm.MetadataCache.&lt;&gt;c__DisplayClass5.&lt;&gt;c__DisplayClass7.&lt;GetMetadataWorkspace&gt;b__4()
at System.Data.Entity.Core.Metadata.Edm.MetadataWorkspace.LoadAndCheckItemCollection[T](Func`1 itemCollectionLoader)
at System.Data.Entity.Core.Metadata.Edm.MetadataWorkspace.&lt;&gt;c__DisplayClass16.&lt;.ctor&gt;b__f()
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at System.Lazy`1.get_Value()
at System.Data.Entity.Core.Metadata.Edm.MetadataWorkspace.GetItemCollection(DataSpace dataSpace, Boolean required)
at System.Data.Entity.Core.Metadata.Edm.MetadataWorkspace.GetItemCollection(DataSpace dataSpace)
at System.Data.Entity.Core.Objects.ObjectContext.InitializeMappingViewCacheFactory(DbContext owner)
at System.Data.Entity.Core.Objects.ObjectContext..ctor(EntityConnection connection, Boolean isConnectionConstructor, ObjectQueryExecutionPlanFactory objectQueryExecutionPlanFactory, Translator translator, ColumnMapFactory columnMapFactory)
at System.Data.Entity.Internal.InternalConnection.CreateObjectContextFromConnectionModel()
at System.Data.Entity.Internal.LazyInternalConnection.CreateObjectContextFromConnectionModel()
at System.Data.Entity.Internal.LazyInternalContext.InitializeContext()
at System.Data.Entity.Internal.InternalContext.Initialize()
at System.Data.Entity.Internal.InternalContext.ForceOSpaceLoadingForKnownEntityTypes()
at System.Data.Entity.DbContext.System.Data.Entity.Infrastructure.IObjectContextAdapter.get_ObjectContext()
at lambda_method(Closure , Object )
at System.Data.Services.Providers.DbContextHelper.GetObjectContext(Object o)
at System.Data.Services.Caching.MetadataCache`1.TryLookup(Type serviceType, Object dataContextInstance)
at System.Data.Services.Providers.BaseServiceProvider.LoadMetadata(Boolean skipServiceOperations)
at System.Data.Services.Providers.EntityFrameworkDataService`1.CreateInternalProvider(Object dataSourceInstance)
at System.Data.Services.DataService`1.CreateMetadataAndQueryProviders(IDataServiceMetadataProvider&amp; metadataProviderInstance, IDataServiceQueryProvider&amp; queryProviderInstance, Object&amp; dataSourceInstance, Boolean&amp; isInternallyCreatedProvider)
at System.Data.Services.DataService`1.CreateProvider()
at System.Data.Services.DataService`1.HandleRequest()
at System.Data.Services.DataService`1.ProcessRequestForMessage(Stream messageBody)
at SyncInvokeProcessRequestForMessage(Object , Object[] , Object[] )
at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]&amp; outputs)
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc&amp; rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc&amp; rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage41(MessageRpc&amp; rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc&amp; rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc&amp; rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage3(MessageRpc&amp; rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc&amp; rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc&amp; rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc&amp; rpc)
at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)</ExceptionString></Exception></TraceRecord></DataItem></TraceData></ApplicationData></E2ETraceEvent><E2ETraceEvent xmlns="http://schemas.microsoft.com/2004/06/E2ETraceEvent"><System xmlns="http://schemas.microsoft.com/2004/06/windows/eventlog/system"><EventID>262164</EventID><Type>3</Type><SubType Name="Information">0</SubType><Level>8</Level><TimeCreated SystemTime="2021-11-08T16:50:19.9963405Z" /><Source Name="System.ServiceModel" /><Correlation ActivityID="{5ffbff76-6cbf-4bb1-a528-801615bf5b77}" /><Execution ProcessName="iisexpress" ProcessID="15812" ThreadID="8" /><Channel/><Computer>UOFL20-G0QBVN2</Computer></System><ApplicationData><TraceData><DataItem><TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Information"><TraceIdentifier>https://learn.microsoft.com/dotnet/framework/wcf/diagnostics/tracing/System-ServiceModel-Channels-MessageSent</TraceIdentifier><Description>Sent a message over a channel.</Description><AppDomain>/LM/W3SVC/3/ROOT-1-132808638175161639</AppDomain><Source>System.ServiceModel.Activation.HostedHttpContext+HostedRequestHttpOutput/42188773</Source><ExtendedData xmlns="http://schemas.microsoft.com/2006/08/ServiceModel/MessageTraceRecord"><MessageProperties><Encoder>ByteStreamMessageEncoder</Encoder><AllowOutputBatching>False</AllowOutputBatching></MessageProperties><MessageHeaders></MessageHeaders></ExtendedData></TraceRecord></DataItem></TraceData></ApplicationData></E2ETraceEvent><E2ETraceEvent xmlns="http://schemas.microsoft.com/2004/06/E2ETraceEvent"><System xmlns="http://schemas.microsoft.com/2004/06/windows/eventlog/system"><EventID>131085</EventID><Type>3</Type><SubType Name="Stop">0</SubType><Level>255</Level><TimeCreated SystemTime="2021-11-08T16:50:19.9963405Z" /><Source Name="System.ServiceModel" /><Correlation ActivityID="{5ffbff76-6cbf-4bb1-a528-801615bf5b77}" /><Execution ProcessName="iisexpress" ProcessID="15812" ThreadID="8" /><Channel/><Computer>UOFL20-G0QBVN2</Computer></System><ApplicationData><TraceData><DataItem><TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Stop"><TraceIdentifier>https://learn.microsoft.com/dotnet/framework/wcf/diagnostics/tracing/System-ServiceModel-Diagno
Error: The server encountered an error processing the request. See
server logs for more details
This issue comes into picture whenever there is any issue at WCF service.
So see more details about the issue, you need to includeexceptiondetailInfaults attribute to true in servicedebug tag.
<Service Behavior>
<Behavior Name="myServiceBehavior">
<servicedebug includeexceptiondetailinfaults="true" />
</Behavior>
</Service Behavior>
Either you can also add class attribute to the service class.
Could not load file or assembly 'Microsoft.Data.Services,
Version=5.6.2.0,Culture=neutral, PublicKeyToken=31bf3856ad364e35' or
one of its dependencies. The located assembly's manifest definition
does not match the assembly reference. (Exception from HRESULT:
0x80131040)
For this problem, first check what version of this dll you have in your output directory.Then
clean your solution
delete all obj and bin directories
uninstall this package from the whole solution
ensure to delete this file in GAC: &userprofile%.nuget\packages\microsoft.data.services - make sure to delete whole directory
now you can install from NuGet the required version

nlog richtextbox - Target cannot be found: 'RichTextBox'

I had this working, but I tried to update nlog and use the nuget packages, including NLog.Windows.Forms.
Now I am getting NLog.NLogConfigurationException with the inner exception:
Target cannot be found: 'RichTextBox'
The project references both: NLog and NLog.Windows.Forms
from packages.config:
<package id="NLog" version="4.3.4" targetFramework="net46" />
<package id="NLog.Config" version="4.3.4" targetFramework="net46" />
<package id="NLog.Schema" version="4.3.4" targetFramework="net46" />
<package id="NLog.Windows.Forms" version="4.2.3" targetFramework="net46" />
from nlog.config
<target name="rtb" xsi:type="RichTextBox" controlName="RichTextBox1" formName="NewForm"
useDefaultRowColoringRules="true" layout="[${date}] [${level:uppercase=true}] [${logger}] ${message}" />
...
<logger name="*" minlevel="Trace" writeTo="file,rtb" />
Adding internal logging didn't seem to give much more information:
...
...
2016-06-03 06:17:23.9385 Trace Scanning MessageLayoutRenderer 'Layout Renderer: ${message}'
2016-06-03 06:17:23.9550 Info Adding target File Target[file]
2016-06-03 06:17:23.9550 Debug Registering target file: NLog.Targets.FileTarget
2016-06-03 06:17:23.9550 Error Error in Parsing Configuration File. Exception: NLog.NLogConfigurationException: Exception occurred when loading configuration from C:\Users\Derek.Morin\Documents\Visual Studio 2010\Projects\ScriptCode\ScriptCode.ConvertedToC#\bin\x86\Debug\NLog.config ---> System.ArgumentException: Target cannot be found: 'RichTextBox'
at NLog.Config.Factory`2.CreateInstance(String name)
at NLog.Config.XmlLoggingConfiguration.ParseTargetsElement(NLogXmlElement targetsElement)
at NLog.Config.XmlLoggingConfiguration.ParseNLogElement(NLogXmlElement nlogElement, String filePath, Boolean autoReloadDefault)
at NLog.Config.XmlLoggingConfiguration.ParseTopLevel(NLogXmlElement content, String filePath, Boolean autoReloadDefault)
at NLog.Config.XmlLoggingConfiguration.Initialize(XmlReader reader, String fileName, Boolean ignoreErrors)
--- End of inner exception stack trace ---
2016-06-03 06:17:23.9700 Error Error has been raised. Exception: System.ArgumentException: Target cannot be found: 'RichTextBox'
at NLog.Config.Factory`2.CreateInstance(String name)
at NLog.Config.XmlLoggingConfiguration.ParseTargetsElement(NLogXmlElement targetsElement)
at NLog.Config.XmlLoggingConfiguration.ParseNLogElement(NLogXmlElement nlogElement, String filePath, Boolean autoReloadDefault)
at NLog.Config.XmlLoggingConfiguration.ParseTopLevel(NLogXmlElement content, String filePath, Boolean autoReloadDefault)
at NLog.Config.XmlLoggingConfiguration.Initialize(XmlReader reader, String fileName, Boolean ignoreErrors)
If I can't get an answer for how to get it working with the nlog.config file, at least I found the following workaround:
I adapted the answer from here: ( I didn't like the colouring choices )
Display NLog trace in RichTextBox
private void SetupRichTextBoxLogger()
{
NLog.Windows.Forms.RichTextBoxTarget target = new NLog.Windows.Forms.RichTextBoxTarget();
target.Name = "RichTextBox";
target.Layout = "${longdate} ${level:uppercase=true} ${logger} ${message}";
target.ControlName = nameof(this.RichTextBox1);
target.FormName = nameof(NewForm);
target.AutoScroll = true;
target.MaxLines = 0;
target.UseDefaultRowColoringRules = true;
AsyncTargetWrapper asyncWrapper = new AsyncTargetWrapper();
asyncWrapper.Name = "AsyncRichTextBox";
asyncWrapper.WrappedTarget = target;
SimpleConfigurator.ConfigureForTargetLogging( asyncWrapper, LogLevel.Trace );
}
Besides having the nuget-package NLog.Windows.Forms installed (Remember to use v4.6 or newer, together with NLog 5.0)
Then it is also recommended to update NLog.config to include NLog.Windows.Forms-assembly in <extensions>:
<?xml version="1.0" encoding="utf-8" ?>
<nlog>
<extensions>
<add assembly="NLog.Windows.Forms"/>
</extensions>
...
</nlog>
FWIW, I had this problem after upgrading to NLog 5 and removing the deprecated NLog.Config. Upon reverting to 4.7.15 with NLog.Config, the problem no longer occurred.
In my case, having NLog.Windows.Forms installed did not help.

Getting an Error in my event log of Team Foundation Server

I don't know if this is the right place to ask this, but I'm getting an error in my eventlog every time I open my TFS webpage I get the following error:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Microsoft-Team Foundation Server" Guid="{80761876-6844-47D5-8106-F8ED2AA8687B}" />
<EventID>0</EventID>
<Version>0</Version>
<Level>2</Level>
<Task>1</Task>
<Opcode>10</Opcode>
<Keywords>0x8000000000000001</Keywords>
<TimeCreated SystemTime="2016-02-24T14:48:40.361409100Z" />
<EventRecordID>650</EventRecordID>
<Correlation ActivityID="{72451AFD-6F04-0000-3340-4572046FD101}" />
<Execution ProcessID="3932" ThreadID="808" />
<Channel>Microsoft-Team Foundation Server/Debug</Channel>
<Computer>WIN-U8K4FA701IJ</Computer>
<Security UserID="S-1-5-19" />
</System>
<UserData>
<Info TraceId="{00000001-0001-0001-0000-000000000000}" xmlns="http://schemas.microsoft.com/TeamFoundation/2010/Framework">
<Tracepoint>599999</Tracepoint>
<ServiceHost>{00000000-0000-0000-0000-000000000000}</ServiceHost>
<ContextId>0</ContextId>
<ProcessName>w3wp</ProcessName>
<Username />
<Service />
<Method />
<Area>WebAccess</Area>
<Layer>Controller</Layer>
<UserAgent />
<Uri />
<Path />
<UserDefined />
<Message>System.Reflection.ReflectionTypeLoadException: Kan een of meer van de gevraagde typen niet laden. Haal de LoaderExceptions-eigenschap op voor meer informatie. bij System.Reflection.RuntimeModule.GetTypes(RuntimeModule module) bij System.Reflection.RuntimeModule.GetTypes() bij System.Reflection.Assembly.GetTypes() bij Microsoft.TeamFoundation.Server.WebAccess.TypeUtils.GetAllTypes(IEnumerable`1 assemblies, Func`2 filter)</Message>
</Info>
</UserData>
</Event>
I tried re-installing everything but it didn't bother.
Who knows what is giving me this error?
First, translate the error message into English to make it readable:
<Message>System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.RuntimeModule.GetTypes()
at System.Reflection.Assembly.GetTypes()
at Microsoft.TeamFoundation.Server.WebAccess.TypeUtils.GetAllTypes(IEnumerable`1 assemblies, Func`2 filter)</Message>
This error may be caused by various factors, for example, if you don't configure build service well. Try to install the TFS 2012 Power Tools, then run the BPA to scan your TFS 2012 Server, you may get something useful.

Manually publish ClickOnce

I'm trying to automate the build and publish (plus some middle steps) and everything worked fine (it compiles, starts and works as it should, with the manifest and the digital signature that I apply using command line) until I tried to "install" the package using ClickOnce.
I got this very very very strange error:
Reference in the manifest does not match the identity in the downloaded assembly XYZ.application.
The previous one was the same but referring to another file.:
Reference in the manifest does not match the identity in the downloaded assembly XYZ.exe.
(I translated the message from Italian to English so it doesn't match the English version of the error message 100%.)
I've created a batch that uses MSBuild to clean and build, after use mt to embed the manifest and signtool to sign the assembly and, in the end, use Mage to create the manifest for ClickOnce, sign it, update the .application file (I don't use Mage to create it, because I need some stuff that Mage doesn't support) and in the end sign it.
I'm using an in-house certificate for testing (I created the root CA, and I used it to sign another certificate I made ad hoc for signing the application and ClickOnce.)
I'm using Visual Studio 2012 and SDK tools.
Here is my XYZ.application file:
<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xrml="urn:mpeg:mpeg21:2003:01-REL-R-NS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1" xmlns:co.v2="urn:schemas-microsoft-com:clickonce.v2">
<assemblyIdentity name="XYZ.application" version="1.0.0.11" publicKeyToken="f685d5914ea12e96" language="it" processorArchitecture="msil" xmlns="urn:schemas-microsoft-com:asm.v1" />
<description asmv2:publisher="AUTHOR" co.v1:suiteName="AUTHOR" asmv2:product="AUTHOR" asmv2:supportUrl="http://help.AUTHOR.net/" co.v1:errorReportUrl="http://support.AUTHOR.net/" xmlns="urn:schemas-microsoft-com:asm.v1" />
<deployment install="true" disallowUrlActivation="true" mapFileExtensions="true" minimumRequiredVersion="1.0.0.11" co.v1:createDesktopShortcut="true">
<subscription>
<update>
<expiration maximumAge="1" unit="days" />
</update>
</subscription>
<deploymentProvider codebase="http://www.AUTHOR.net/app/XYZ.application" />
</deployment>
<dependency>
<dependentAssembly dependencyType="install" codebase="Application Files\XYZ_1_0_0_11\XYZ.exe.manifest" size="17032">
<assemblyIdentity name="XYZ.exe" version="1.0.0.11" publicKeyToken="f685d5914ea12e96" language="neutral" processorArchitecture="msil" type="win32" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>7YuwliwCxwoquWp3EQf90NMXbg4=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
<compatibleFrameworks xmlns="urn:schemas-microsoft-com:clickonce.v2">
<framework targetVersion="4.5" profile="Full" supportedRuntime="4.0.30319" />
</compatibleFrameworks>
<publisherIdentity name="..." issuerKeyHash="..." /><Signature Id="StrongNameSignature" xmlns="http://www.w3.org/2000/09/xmldsig#">...SIGNATURE STUFF REMOVED...</Signature></asmv1:assembly>
Here there is the publish.bat batch file (it is not the entire file, just the important stuff).
CALL "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat"
SET PROJECT_NAME=XYZ
SET PROJECT_VERSION=1.0.0.11
SET PROJECT_CSPROJ=%PROJECT_NAME%.csproj
SET PROJECT_PLATFORM=AnyCPU
SET PROJECT_CONFIGURATION=ReleaseForPublish
SET SDK_DIR=C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin
SET PROJECT_DIR=PATH_TO_PROJECT_DIR
SET PROJECT_BUILDDIR=%PROJECT_DIR%\bin
SET PROJECT_TARGETDIR=%PROJECT_BUILDDIR%\%PROJECT_CONFIGURATION%
SET PROJECT_TARGETFILENAME=%PROJECT_NAME%.exe
SET PUBLISH_PROCESSOR=msil
SET PUBLISH_DIR=%PROJECT_DIR%\publish
SET PUBLISH_TARGETDIR_BASE=Application Files\%PROJECT_NAME%_%PROJECT_VERSION:.=_%
SET PUBLISH_TARGETDIR=%PUBLISH_DIR%\%PUBLISH_TARGETDIR_BASE%
SET PUBLISH_PROVIDERURL=http://www.AUTHOR.net/app/%PROJECT_NAME%.application
SET PUBLISH_MANIFESTURL=http://www.AUTHOR.net/app/Application Files/%PROJECT_NAME%_%PROJECT_VERSION:.=_%/%PROJECT_NAME%.exe.manifest
SET PUBLISH_SUPPORTURL=http://www.AUTHOR.net/support
SET CERTIFICATE_PATH=%PROJECT_DIR%\_resources\Certificates\codesign.pfx
SET CERTIFICATE_PASSWORD=123456
REM Clean the project
CALL :ExecuteCommand "Cleaning build" "MSBUILD ""%PROJECT_DIR%\%PROJECT_CSPROJ%"" /p:Configuration=""%PROJECT_CONFIGURATION%"" /p:Platform=""%PROJECT_PLATFORM%"" /t:Clean"
REM Build the project
CALL :ExecuteCommand "Building project" "MSBUILD ""%PROJECT_DIR%\%PROJECT_CSPROJ%"" /p:Configuration=""%PROJECT_CONFIGURATION%"" /p:Platform=""%PROJECT_PLATFORM%"" /t:Build"
REM Embed the manifest
CALL :ExecuteCommand "Embedding manifest" """%SDK_DIR%\MT"" -manifest ""%PROJECT_DIR%\_resources\app.manifest"" -outputresource:""%PROJECT_TARGETDIR%\%PROJECT_TARGETFILENAME%;#1"""
REM Sign the assembly
CALL :ExecuteCommand "Signing the assembly" """%SDK_DIR%\SIGNTOOL"" sign /f ""%CERTIFICATE_PATH%"" /p %CERTIFICATE_PASSWORD% /v ""%PROJECT_TARGETDIR%\%PROJECT_TARGETFILENAME%"""
REM Copy the application to the publish folder
CALL :ExecuteCommand "Copying binaries to the publish folder" "XCOPY /E /R /H /Q ""%PROJECT_TARGETDIR%"" ""%PUBLISH_TARGETDIR%"""
REM Create the click once manifest
CALL :ExecuteCommand "Creating click-once application" "MAGE -New Application -name ""%PROJECT_NAME%"" -Version %PROJECT_VERSION% -IconFile ""output.ico"" -TrustLevel FullTrust -UseManifestForTrust true -Publisher ""ADV Network GmbH"" -SupportURL ""%PUBLISH_SUPPORTURL%"" -Processor %PUBLISH_PROCESSOR% -ToFile ""%PUBLISH_TARGETDIR%\%PROJECT_NAME%.exe.manifest"" -FromDirectory ""%PUBLISH_TARGETDIR%"" -CertFile ""%CERTIFICATE_PATH%"" -Password %CERTIFICATE_PASSWORD%"
REM Sign the manifest
CALL :ExecuteCommand "Signing click-once application" "MAGE -Sign ""%PUBLISH_TARGETDIR%\%PROJECT_NAME%.exe.manifest"" -CertFile ""%CERTIFICATE_PATH%"" -Password %CERTIFICATE_PASSWORD%"
REM Update the version and the manifest in the application file
CALL :ExecuteCommand "Updating application deployment [1/2]" "MAGE -Update ""%PUBLISH_DIR%\%PROJECT_NAME%.application"" -Version %PROJECT_VERSION% -Install true -IncludeProviderURL true -ProviderURL ""%PUBLISH_PROVIDERURL%"" -AppManifest ""%PUBLISH_TARGETDIR%\%PROJECT_NAME%.exe.manifest"" -AppCodeBase ""%PUBLISH_TARGETDIR_BASE%\%PROJECT_NAME%.exe.manifest"""
REM Update the min version in the application file
CALL :ExecuteCommand "Updating application deployment [2/2]" "MAGE -Update ""%PUBLISH_DIR%\%PROJECT_NAME%.application"" -MinVersion %PROJECT_VERSION% -CertFile ""%CERTIFICATE_PATH%"" -Password %CERTIFICATE_PASSWORD%"
REM Sign the application
CALL :ExecuteCommand "Signing application deployment" "MAGE -Sign ""%PUBLISH_DIR%\%PROJECT_NAME%.application"" -CertFile ""%CERTIFICATE_PATH%"" -Password %CERTIFICATE_PASSWORD%"
ECHO - Finalizing process
REM Copy the .application inside the target dir
COPY /Y "%PUBLISH_DIR%\%PROJECT_NAME%.application" "%PUBLISH_TARGETDIR%\%PROJECT_NAME%.application" >NUL
REM Add .deploy extension
FOR /r "%PUBLISH_TARGETDIR%" %%i IN (*.*) DO (
IF "%%~xi" NEQ ".manifest" (
IF "%%~xi" NEQ ".application" (
MOVE /Y "%%i" "%%i.deploy" >NUL
)
)
)
This is the error message (in Italian):
INFORMAZIONI VERSIONE PIATTAFORMA (platform informations)
Windows : 6.1.7601.65536 (Win32NT)
Common Language Runtime : 4.0.30319.18052
System.Deployment.dll : 4.0.30319.17929 built by: FX45RTMREL
clr.dll : 4.0.30319.18052 built by: FX45RTMGDR
dfdll.dll : 4.0.30319.17929 built by: FX45RTMREL
dfshim.dll : 4.0.31106.0 (Main.031106-0000)
ORIGINI (sources)
URL distribuzione : file:///PATH_TO_PUBLISH/XYZ.application
URL applicazione : file:///PATH_TO_PUBLISH/Application%20Files/XYZ_1_0_0_11/XYZ.exe.manifest
IDENTITÀ (identity)
Identità distribuzione : XYZ.application, Version=1.0.0.11, Culture=it, PublicKeyToken=f685d5914ea12e96, processorArchitecture=msil
Identità applicazione : XYZ.exe, Version=1.0.0.11, Culture=neutral, PublicKeyToken=f685d5914ea12e96, processorArchitecture=msil, type=win32
RIEPILOGO APPLICAZIONE (application summary)
* Applicazione installabile. (application installable)
RIEPILOGO ERRORI (errors summary)
Quello che segue è un riepilogo degli errori. Informazioni dettagliate su tali errori sono disponibili più avanti nel registro.
* L'attivazione di PATH_TO_PUBLISH\XYZ.application ha causato un'eccezione. Sono stati rilevati i messaggi di errore seguenti:
+ Il riferimento nel manifesto non corrisponde all'identità dell'assembly scaricato XYZ.application.
RIEPILOGO ERRORI TRANSAZIONE ARCHIVIO COMPONENTI (components archive transaction errors summary)
Nessun errore di transazione rilevato. (no errors)
AVVISI (warnings)
Nessun avviso durante l'operazione. (no warnings)
STATO OPERAZIONE (operation state)
* [04/10/2013 10:09:57] : Attivazione di PATH_TO_PUBLISH\XYZ.application avviata.
* [04/10/2013 10:09:57] : Elaborazione del manifesto di distribuzione completata.
* [04/10/2013 10:09:57] : Installazione dell'applicazione avviata.
* [04/10/2013 10:09:58] : Elaborazione del manifesto dell'applicazione completata.
* [04/10/2013 10:10:00] : Trovata una versione Runtime compatibile 4.0.30319.
* [04/10/2013 10:10:00] : Richiesta del trust e rilevamento della piattaforma completati.
DETTAGLI ERRORI (error details)
Durante l'operazione sono stati rilevati gli errori seguenti.
* [04/10/2013 10:10:01] System.Deployment.Application.InvalidDeploymentException (RefDefValidation)
- Il riferimento nel manifesto non corrisponde all'identità dell'assembly scaricato XYZ.application.
- Origine: System.Deployment
- Analisi dello stack:
in System.Deployment.Application.DownloadManager.ProcessDownloadedFile(Object sender, DownloadEventArgs e)
in System.Deployment.Application.FileDownloader.DownloadModifiedEventHandler.Invoke(Object sender, DownloadEventArgs e)
in System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
in System.Deployment.Application.SystemNetDownloader.DownloadAllFiles()
in System.Deployment.Application.FileDownloader.Download(SubscriptionState subState)
in System.Deployment.Application.DownloadManager.DownloadDependencies(SubscriptionState subState, AssemblyManifest deployManifest, AssemblyManifest appManifest, Uri sourceUriBase, String targetDirectory, String group, IDownloadNotification notification, DownloadOptions options)
in System.Deployment.Application.ApplicationActivator.DownloadApplication(SubscriptionState subState, ActivationDescription actDesc, Int64 transactionId, TempDirectory& downloadTemp)
in System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState& subState, ActivationDescription actDesc)
in System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
in System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
DETTAGLI TRANSAZIONE ARCHIVIO COMPONENTI
Nessuna informazione disponibile sulla transazione.
This problem is caused by not setting the reference in the deployment manifest to the application manifest. Publish it from Visual Studio and then open the .application file (deployment manifest) with MageUI and you'll see the reference to the .exe.manifest (application manifest) in the "Application Files/a_b_c_d" folder (where a_b_c_d is the version). THAT's what you need to be sure you are setting.

Deploy ClickOnce on Windows XP

I'm trying to install my C# application on a clean Windows XP machine. The program needs .NET Framework 3.5, so I added that in the prerequisites. The application works perfectly fine on Windows 7 machines, but it fails with Windows XP and gives me the following error:
ERROR DETAILS
Following errors were detected during this operation.
* [3/14/2013 11:11:26 AM] System.Deployment.Application.InvalidDeploymentException (ManifestParse)
- Exception reading manifest from file://tsclient/D/publish/Application%20Files/LivePigeonClient_1_0_0_16/LivePigeonClient.application: the manifest may not be valid or the file could not be opened.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri)
at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestDirectBypass(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation)
at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestBypass(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState, IDownloadNotification notification, DownloadOptions options)
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
--- Inner Exception ---
System.Deployment.Application.InvalidDeploymentException (SignatureValidation)
- Manifest XML signature is not valid.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.Manifest.AssemblyManifest.ValidateSignature(Stream s)
at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri)
--- Inner Exception ---
System.Security.Cryptography.CryptographicException
- SignatureDescription could not be created for the signature algorithm supplied.
- Source: System.Security
- Stack trace:
at System.Security.Cryptography.Xml.SignedXml.CheckSignedInfo(AsymmetricAlgorithm key)
at System.Security.Cryptography.Xml.SignedXml.CheckSignatureReturningKey(AsymmetricAlgorithm& signingKey)
at System.Deployment.Internal.CodeSigning.SignedCmiManifest.Verify(CmiManifestVerifyFlags verifyFlags)
at System.Deployment.Application.Manifest.AssemblyManifest.ValidateSignature(Stream s)
An InvalidDeploymentException (SignatureValidation)
What is causing this problem?
Application manifest
<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xrml="urn:mpeg:mpeg21:2003:01-REL-R-NS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1" xmlns:co.v2="urn:schemas-microsoft-com:clickonce.v2">
<assemblyIdentity name="LivePigeonClient.application" version="1.0.0.16" publicKeyToken="9c18f07266746296" language="neutral" processorArchitecture="x86" xmlns="urn:schemas-microsoft-com:asm.v1" />
<description asmv2:publisher="LivePigeonClient" asmv2:product="LivePigeonClient" xmlns="urn:schemas-microsoft-com:asm.v1" />
<deployment install="true" mapFileExtensions="true" co.v1:createDesktopShortcut="true">
<deploymentProvider codebase="http://nb-stage/LivePigeonClient/LivePigeonClient.application" />
</deployment>
<dependency>
<dependentAssembly dependencyType="install" codebase="Application Files\LivePigeonClient_1_0_0_16\LivePigeonClient.exe.manifest" size="19770">
<assemblyIdentity name="LivePigeonClient.exe" version="1.0.0.16" publicKeyToken="9c18f07266746296" language="neutral" processorArchitecture="x86" type="win32" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>YcOGziTuwXQ5l5/mkvEF3puhg/M=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
<publisherIdentity name="CN=VANHULTEN\max" issuerKeyHash="ba68cf2261b7dec8653727cbceeb3f0f3817bb37" /><Signature Id="StrongNameSignature" xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha256" /><Reference URI=""><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /><Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" /><DigestValue>aYws5APsQnYt1TNpwaT6ZcoySBiM+HBSH7d0l8/FEmE=</DigestValue></Reference></SignedInfo><SignatureValue>vm7Tjd/SFZK0WT1YGgEqWP6QOgJ3U26D/+32LrxmjMysNlfuJ21MjAmjiP3Hcd4fuDX6QJ7ctH4+Vrlx+kXrrfnVcceBbhAAph4uosfo8qKpwCHbfp/J0leQ3DzT61Sd4EE//wZW6qJcpgW8qqn/id7AH/jAcCbrpOIufLXc7yU=</SignatureValue><KeyInfo Id="StrongNameKeyInfo"><KeyValue><RSAKeyValue><Modulus>wj4ZM4ud3sPlAxopNQiYHeg4fg+3TSEHWIWrjNV47F3KePb+nOtYblz7nEzplq5HPmX5gyoauqpmelyB453l5N6Hd6WfHuyZpQB6ESxVuiI9XS3L/WXMrazRj2EeExnpEdslVJx32lInreg/rwDHz59fOP1G+hKnzgoO8ViAgGU=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue></KeyValue><msrel:RelData xmlns:msrel="http://schemas.microsoft.com/windows/rel/2005/reldata"><r:license xmlns:r="urn:mpeg:mpeg21:2003:01-REL-R-NS" xmlns:as="http://schemas.microsoft.com/windows/pki/2005/Authenticode"><r:grant><as:ManifestInformation Hash="6112c5cf9774b71f5270f88c184832ca65faa4c16933d52d7642ec03e42c8c69" Description="" Url=""><as:assemblyIdentity name="LivePigeonClient.application" version="1.0.0.16" publicKeyToken="9c18f07266746296" language="neutral" processorArchitecture="x86" xmlns="urn:schemas-microsoft-com:asm.v1" /></as:ManifestInformation><as:SignedBy /><as:AuthenticodePublisher><as:X509SubjectName>CN=VANHULTEN\max</as:X509SubjectName></as:AuthenticodePublisher></r:grant><r:issuer><Signature Id="AuthenticodeSignature" xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha256" /><Reference URI=""><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /><Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" /><DigestValue>CdT1rv1rwUXqtJn0L3bDBoocdBFyTmyn0kcJMsw0Ioo=</DigestValue></Reference></SignedInfo><SignatureValue>d/fsB1cfPn+29iEB3ltgkoQ4HE2T/wxQzJAhKIxCDM6oZLjNnvATM2stOvWs8nvdINFQEtef19aMjaYIAu9E00oncYvy+Sxv+qtNM2AEpTkRKQTrWHCR7DymiK4JPRmT+ixKwNCWwxMIl6LL/12f7o57COd+5cM1+FfgC6ew5TU=</SignatureValue><KeyInfo><KeyValue><RSAKeyValue><Modulus>wj4ZM4ud3sPlAxopNQiYHeg4fg+3TSEHWIWrjNV47F3KePb+nOtYblz7nEzplq5HPmX5gyoauqpmelyB453l5N6Hd6WfHuyZpQB6ESxVuiI9XS3L/WXMrazRj2EeExnpEdslVJx32lInreg/rwDHz59fOP1G+hKnzgoO8ViAgGU=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue></KeyValue><X509Data><X509Certificate>MIIBzTCCATagAwIBAgIQHYBpoynYcYpB1zAtPuky+zANBgkqhkiG9w0BAQsFADAlMSMwIQYDVQQDHhoAVgBBAE4ASABVAEwAVABFAE4AXABtAGEAeDAeFw0xMzAyMjgxMDAyNThaFw0xNDAyMjgxNjAyNThaMCUxIzAhBgNVBAMeGgBWAEEATgBIAFUATABUAEUATgBcAG0AYQB4MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDCPhkzi53ew+UDGik1CJgd6Dh+D7dNIQdYhauM1XjsXcp49v6c61huXPucTOmWrkc+ZfmDKhq6qmZ6XIHjneXk3od3pZ8e7JmlAHoRLFW6Ij1dLcv9ZcytrNGPYR4TGekR2yVUnHfaUiet6D+vAMfPn184/Ub6EqfOCg7xWICAZQIDAQABMA0GCSqGSIb3DQEBCwUAA4GBAGIPyDRw+3ORyEMFenNwwOKY2pb5XJ4+VfWZ1qsajyvEOxhQRIsQc04XhSeTLqa2hWumXHSQ/GgKMf4cR03cMBRwIVQxY03YmnoiLxqfkbzSAQMLrSKp7jychp+oODkuIKBruLdNLB/xlAv09dJac28sUG6p+8uAObL9HZDkhgr6</X509Certificate></X509Data></KeyInfo></Signature></r:issuer></r:license></msrel:RelData></KeyInfo></Signature></asmv1:assembly>
Does the Windows XP machine have SP-3 installed, and all of the windows updates? ALso, is .NET 3.5 installed?
Change the Signature Algorithm. Right click Project-> Properties-> Signing, re-select or recreate the certificate. After that the Signature Algorithm will change to sha1RSA.
http://social.msdn.microsoft.com/Forums/windows/en-US/f5b934d2-e8b9-4401-b038-b84aefbdf836/clickonce-exception-reading-manifest?forum=winformssetup

Categories

Resources