【发布时间】:2013-02-04 13:57:55
【问题描述】:
我们有一个 C# 中的 winforms clickonce 应用程序,它被授予完全信任并使用有效证书签名。
该应用程序在 Windows XP、Windows 7 上运行良好并且可以正确更新。但是,在 Windows 8 机器上,它只是无法更新。该应用程序运行正常。但是,升级到更高版本的第一个更新请求失败:System.Deployment.Application.TrustNotGrantedException
调用ApplicationDeployment::CheckForDetailedUpdate() 失败后代码失败。想知道为什么会发生这种情况,因为完全相同的代码在所有先前版本的 Windows 上运行良好。任何帮助将不胜感激。以下是相关的堆栈跟踪:
System.Deployment.Application.TrustNotGrantedException: User has refused to grant required permissions to the application.
at System.Deployment.Application.ApplicationTrust.RequestTrust(SubscriptionState subState, Boolean isShellVisible, Boolean isUpdate, ActivationContext actCtx, TrustManagerContext tmc)
at System.Deployment.Application.DeploymentManager.DetermineTrustCore(Boolean blocking, TrustParams tp)
at System.Deployment.Application.DeploymentManager.DetermineTrust(TrustParams trustParams)
at System.Deployment.Application.ApplicationDeployment.CheckForDetailedUpdate(Boolean persistUpdateCheckResult)
at System.Deployment.Application.ApplicationDeployment.CheckForDetailedUpdate()
【问题讨论】:
-
尝试了另一台 Windows 8 笔记本电脑,但升级失败,同样错误。想知道完全信任应用程序会出现什么问题。 -Manish。
标签: c# .net winforms visual-studio clickonce