0

这是我在 ClickOnce 上的第三篇文章,但每个人都有自己的主题,所以我希望没人介意。我正在紧急将现有应用程序迁移到新服务器。我将 ClickOnce 应用程序发布到服务器(仅供在线使用,不用于安装),如果我尝试通过 Web 浏览器执行它,我会收到一个消息框,提示“无法继续。应用程序格式不正确。请联系应用程序供应商以获取协助。”,其详细日志包括以下内容;(我用*掩盖了 URL 中的一些字符串,因为它是私人信息)

PLATFORM VERSION INFO
Windows : 5.1.2600.196608 (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: http://**.**.***.173:10080/*****/ClickOnce/*********.application?comid=*****&userjpname=************&userfullname=************&canregist=True&canmanage=True&systemid=0

ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of http://**.**.***.173:10080/*****/ClickOnce/*********.application?comid=*****&userjpname=************&userfullname=************&canregist=True&canmanage=True&systemid=0 resulted in exception. Following failure messages were detected:
+ Exception reading manifest from http://**.**.***.173:10080/*****/ClickOnce/*********.application?comid=*****&userjpname=************&userfullname=************&canregist=True&canmanage=True&systemid=0: the manifest may not be valid or the file could not be opened.
+ Manifest XML signature is not valid.
+ The digital signature of the object did not verify.

COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.

WARNINGS
There were no warnings during this operation.

OPERATION PROGRESS STATUS
* [2012/07/24 13:16:39] : Activation of http://**.**.***.173:10080/*****/ClickOnce/*********.application?comid=*****&userjpname=************&userfullname=************&canregist=True&canmanage=True&systemid=0 has started.

ERROR DETAILS
Following errors were detected during this operation.
* [2012/07/24 13:16:39] System.Deployment.Application.InvalidDeploymentException (ManifestParse)
- Exception reading manifest from http://**.**.***.173:10080/*****/ClickOnce/*********.application?comid=*****&userjpname=************&userfullname=************&canregist=True&canmanage=True&systemid=0: 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
- The digital signature of the object did not verify.

- Source: System.Deployment
- Stack trace:
at System.Deployment.Internal.CodeSigning.SignedCmiManifest.Verify(CmiManifestVerifyFlags verifyFlags)
at System.Deployment.Application.Manifest.AssemblyManifest.ValidateSignature(Stream s)

COMPONENT STORE TRANSACTION DETAILS
No transaction information is available.

我的服务器地址是http://**.**.***.173:10080,并且 clickonce 应用程序发布在http://**.**.***.173:10080/*****/ClickOnce文件夹中。

我假设它试图找到一个带有这些奇怪参数(或查询字符串?)的应用程序清单文件(.manifest),例如 comid、userjpname、userfullname、canregist、canmanage、True 和 systemid,因此它返回了一个错误。

在我的部署清单文件中,应用程序清单文件的位置指定如下。不知道这些参数是从哪里来的。

<dependentAssembly 
    dependencyType="install"  
    codebase="MYAPPNAME_9_9_9_99\MYAPPNAME.exe.manifest"
    size="8532">
<assemblyIdentity
    name="MYAPPNAME.exe"
    version="1.0.1.43"
    publicKeyToken="*************"
    language="neutral"
    processorArchitecture="msil"
    type="win32" />
4

1 回答 1

0

Did you try to sign the application and deployment manifests again?

Reading you description again, I'm a bit confused.

First you create an application manifest.

Then you sign it.

Then you create a deployment manifest and explicitly point it to your application manifest.

Then you sign this, too.

(btw: you have to do the signing part every time you change something.)

于 2012-07-24T09:57:08.130 回答