【发布时间】:2013-08-18 16:15:07
【问题描述】:
此问题在发布后似乎是随机发生的。 网站会正常工作然后砰,我在解析 webconfig 时收到此错误。我只是重新发布,它又可以正常工作了。发布时,我选中了该框以删除现有文件,因此周围不应该有垃圾。
这是一个使用 .net 4.5 和与 Yahoo! 集成的 Azure 访问控制服务 (ACS) 的 MVC4 项目。从 Yahoo 重定向回来时会发生此错误。这种方式每次都会发生,但我发现了一个帖子(当然现在我找不到了),其中存在 4.5.1 Identity and Access Visual Studio 集成的错误。我去了以前的版本,现在只是偶尔。
ID8030:无法解析“type”属性的值。
验证'<issuerNameRegistry type="System.IdentityModel.Tokens.ValidatingIssuerNameRegistry, System.IdentityModel.Tokens.ValidatingIssuerNameRegistry"><authority name="[my authority]"><keys><add thumbprint="[print]" /></keys><validIssuers><add name="[issuer]" /></validIssuers></authority></issuerNameRegistry>'元素的type属性是否正确。
在上面的错误信息中,我已经为这篇文章替换了括号 ([]) 中的项目。
这是堆栈跟踪:
[TypeLoadException: ID8030: The value of the 'type' property could not be parsed. *** element is correct.]
System.IdentityModel.Configuration.TypeResolveHelper.Resolve(ConfigurationElementInterceptor customTypeElement, Type customType) +602659
System.IdentityModel.Configuration.IdentityConfiguration.GetIssuerNameRegistry(IssuerNameRegistryElement element) +114
System.IdentityModel.Configuration.IdentityConfiguration.LoadHandlerConfiguration(IdentityConfigurationElement element) +841
System.IdentityModel.Configuration.IdentityConfiguration.LoadConfiguration(IdentityConfigurationElement element) +117
System.IdentityModel.Configuration.IdentityConfiguration..ctor(String identityConfigurationName) +180
System.IdentityModel.Services.Configuration.FederationConfiguration.LoadConfiguration(FederationConfigurationElement element) +392
System.IdentityModel.Services.Configuration.FederationConfiguration..ctor(Boolean loadConfig) +94
System.IdentityModel.Services.FederatedAuthentication.CreateFederationConfiguration() +71
System.IdentityModel.Services.FederatedAuthentication.get_FederationConfiguration() +85
System.IdentityModel.Services.HttpModuleBase.Init(HttpApplication context) +56
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +418
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +336
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296
[HttpException (0x80004005): ***... element is correct.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9873784
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254
【问题讨论】:
-
这不完全是您问题的答案,但它可能对您有所帮助。您是否考虑过使用 Thinktecture 的身份模型包装器?我已经取得了很好的成功,它允许您以编程方式进行比核心 .net 代码更多的配置,这可能会让您摆脱配置问题。 Identity Model Nuget Package
-
谢谢,我会试试看效果如何。看起来不错:)
标签: asp.net-mvc-4 azure web-config acs federated-identity