MPa*_*lak 6 web-config azure federated-identity acs asp.net-mvc-4
这个问题在发布后似乎随机发生. 该网站将正常工作,然后bam,我得到这个错误解析webconfig.我只是重新发布,它再次正常工作.发布时,我选中了该框以删除现有文件,因此不应该存在垃圾.
这是一个使用.net 4.5和Azure访问控制服务(ACS)与Yahoo!集成的MVC4项目.从Yahoo重定向时会发生此错误.这种方式每次都会发生,但我发现了一个帖子(当然我现在找不到),其中4.5.1 Identity和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
Run Code Online (Sandbox Code Playgroud)
小智 17
我在运行本地时遇到了同样的问题.我正在浏览这里找到的方法:http://msdn.microsoft.com/en-us/library/jj161104.aspx并且会在该程序集上找到类型未找到错误.
我仔细检查以确保我通过NuGet下拉组件,甚至卸载并重新安装它......没有骰子. 它基本上归结为缺少对System.IdentityModel.Tokens.ValidatingIssuerNameRegistry的引用
因此,如果您确实通过NuGet将其拉下来并且仍然存在问题,请记住,当NuGet删除此软件包时,它会将其放入文件系统中解决方案级别的软件包文件夹中.
如果您的项目未显示对System.IdentityModel.Tokens.ValidatingIssuerNameRegistry的引用,请通过右键单击项目将程序集添加到项目中,选择Add Reference,Browse,然后单击Browse按钮,然后浏览到packages文件夹,找到dll([Your Solution Root] packages\System.IdentityModel.Tokens.ValidatingIssuerNameRegistry.4.5.1\lib \net45)并添加它.
我希望这有帮助.
小智 2
我遇到了同样的问题,但它对我来说是持续存在的,而不是偶发的,所以也许是不同的根本问题。
通过在我的 MVC 4 项目中安装以下 NuGet 包,我能够解决该问题: http://www.nuget.org/packages/System.IdentityModel.Tokens.ValidatingIssuerNameRegistry/
我不记得这是否是在新的 MVC 4 项目中默认添加的。我曾一度将其删除,所以也许先删除然后重新安装才能解决问题。不管怎样,通过添加上面的包,我能够让我的 MVC 4 项目与 ACS 正确配合。
希望它也适合你。
| 归档时间: |
|
| 查看次数: |
5753 次 |
| 最近记录: |