我一直在无缘无故地遇到“未授予信任”的问题。几年来,我多次多次部署我的应用程序。出乎意料的是,我遇到了一个奇怪的问题,我一直在使用相同的密钥,直到 3000 年才会过期,这给我带来了问题。或者是吗?是不是还有什么可责备的?与往常一样,密钥已安装在正确的证书存储中。
这是最奇怪的部分:我发布了应用程序,然后让两个 IIS 虚拟应用程序指向同一个物理位置。当我尝试查看它们时,一个人说信任没有被授予另一个人没有......它只是按预期工作。
所以最后,似乎关键不是问题,而是 IIS 的问题。这会敲响警钟吗?
我记得很久以前写这篇文章的同事最初不得不在一个 xml 文件中编辑一些机器密钥,但这并没有永远改变。罪魁祸首可能是什么?
对于详细日志中的错误,未授予的信任有此:
错误详情
Following errors were detected during this operation.
* [5/18/2012 1:15:40 PM] System.Deployment.Application.TrustNotGrantedException (Unknown subtype)
- User has refused to grant required permissions to the application.
- Source: System.Deployment
- Stack trace:
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.InPlaceHostingManager.AssertApplicationRequirements(Boolean grantApplicationTrust)
at System.Deployment.Application.InPlaceHostingManager.AssertApplicationRequirements()
at MS.Internal.AppModel.XappLauncherApp.AssertApplicationRequirementsAsync(Object unused)
* [5/18/2012 1:15:40 PM] System.Deployment.Application.DeploymentException (Unknown subtype)
- The AssertApplicationRequirements method failed. The application cannot be committed.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.DeploymentManager.WaitForAssertApplicationRequirements()
at System.Deployment.Application.DeploymentManager.SynchronizeCore(Boolean blocking)
at System.Deployment.Application.DeploymentManager.SynchronizeAsyncWorker()