Windows Azure intermittent Identity error when parsing webconfig

隐身守侯 提交于 2019-12-03 15:03:30

I had the same issue when running local. I was going through the How-To found here: http://msdn.microsoft.com/en-us/library/jj161104.aspx and would get the type not found error on that assembly.

I double checked to make sure I pulled down the assembly via NuGet and even uninstalled and reinstalled it... no dice. It basically boiled down to a missing reference to the System.IdentityModel.Tokens.ValidatingIssuerNameRegistry

So, if you did pull this down via NuGet and you still have the issue, remember that when NuGet drops this package, it will throw it in a packages folder that's at the solution level in the file system.

If your project doesn’t show a reference to System.IdentityModel.Tokens.ValidatingIssuerNameRegistry, add the assembly to your project by right clicking the project, select Add Reference, Browse, then click the Browse button and then browse up to the packages folder and find the dll ([Your Solution Root]packages\System.IdentityModel.Tokens.ValidatingIssuerNameRegistry.4.5.1\lib\net45) and add it.

I hope this helps.

I ran into the same issue but it was constant for me, not sporadic, so perhaps a different underlying root issue.

I was able to fix the issue though by installing the following NuGet package in my MVC 4 project: http://www.nuget.org/packages/System.IdentityModel.Tokens.ValidatingIssuerNameRegistry/

I can't remember if this was added by default in a new MVC 4 project. I did at one point remove it so perhaps it may have been removing then reinstalling that resolved the issue. Either way, by adding the package above back I was able to get my MVC 4 project working with ACS correctly.

Hope it works for you as well.

I just had the same problem. One way to solve it is to add a reference to the DLL specified in the other posts.

Another option is to replace the section with this one, that uses a class available in the core .Net Framework 4.5 (you must add a reference to System.IdentityModel too):

<issuerNameRegistry type="System.IdentityModel.Tokens.ConfigurationBasedIssuerNameRegistry, System.IdentityModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
  <trustedIssuers>
    <add thumbprint="[print]" name="[issuer]" />
  </trustedIssuers>
</issuerNameRegistry>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!