【发布时间】:2021-01-11 20:20:28
【问题描述】:
我有一个从 Web 部署的 ClickOnce VSTO 应用程序。我们的 EV 代码签名证书已过期,CA 需要很长时间才能颁发新证书。同时,我们有一些紧急更新要推送,因此正在考虑使用临时自签名证书发布。
我创建了自签名证书using Makecert and pvk2pfx。我现在有三个文件:.cert、.pfx 和 .pvk。我使用 .pfx 文件发布了应用的新更新。
当 ClickOnce 尝试更新时,它会抛出以下错误:
Name: AppName
From: https://apps.website.com/appname/name.vsto
************** Exception Text **************
System.Security.SecurityException: Customized functionality in this application will not work because the certificate used to sign the deployment manifest for AppName or its location is not trusted. Contact your administrator for further assistance.
at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInTrustEvaluator.VerifyTrustPromptKeyInternal(ClickOnceTrustPromptKeyValue promptKeyValue, DeploymentSignatureInformation signatureInformation, String productName, TrustStatus status)
at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInTrustEvaluator.VerifyTrustUsingPromptKey(Uri manifest, DeploymentSignatureInformation signatureInformation, String productName, TrustStatus status)
at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInTrustEvaluator.VerifyTrustUsingPromptKey(Uri manifest, DeploymentSignatureInformation signatureInformation, String productName)
at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.ProcessSHA1Manifest(ActivationContext context, DeploymentSignatureInformation signatureInformation, PermissionSet permissionsRequested, Uri manifest, ManifestSignatureInformationCollection signatures, AddInInstallationStatus installState)
at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.VerifySecurity(ActivationContext context, Uri manifest, AddInInstallationStatus installState)
at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.InstallAddIn()
The Zone of the assembly that failed was: MyComputer
我尝试通过证书导入向导使用 .cer 文件安装证书。证书现在安装在“当前用户/受信任的发布者/证书”容器中。运行 mmc.exe 时可以看到,并且“Intended Purposes”属性设置为“
我错过了什么?分区有问题吗?在这种情况下,由于我对分区不太熟悉,您能帮忙解决一下吗?
【问题讨论】:
标签: certificate clickonce