Windows Azure Intermittent Identification Error while analyzing webconfig

This issue happens by accident after posting. The site will work fine and then bam, I get this error while analyzing webconfig. I just reissue and everything works fine. When publishing, I checked the box to delete existing files so that there is no room for garbage.

This is an MVC4 project using .net 4.5 and Azure Access Control Service (ACS) integrated with Yahoo !. This error occurs when redirecting back from Yahoo. This method happens every time, but I found a message (which I cannot find now, of course), where there was an error with integration of 4.5.1 Identity and Access Visual Studio. I went to the previous version, and now it is only occasionally.

ID8030: The value of the type property cannot be parsed.
Verify that the type attribute of the element '<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>' correct.

In the above error message, I replaced the items in brackets ([]) for this message.

Here is the stack trace:

 [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 
+6
source share
3 answers

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

I double-checked to make sure I pulled the assembly through NuGet and even uninstalled and reinstalled it ... without cubes. It basically boiled down to a missing link to System.IdentityModel.Tokens.ValidatingIssuerNameRegistry

So, if you did this with NuGet and you still have a problem, remember that when NuGet drops this package, it will be packages that are at the solution level in the file system.

If your project does not show a link to System.IdentityModel.Tokens.ValidatingIssuerNameRegistry, add the assembly to your project, right-click the project, select Add Link, Browse, then click Browse, and then go to the " Packages "and find the dll ( [The root of your solution] \ System.IdentityModel.Tokens.ValidatingIssuerNameRegistry.4.5.1 \ lib \ net45 ) and add it.

Hope this helps.

+17
source

I ran into the same problem, but for me it was persistent and not sporadic, so maybe another main root problem.

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

I can’t remember whether this was added by default in the new MVC 4 project. At some point, I deleted it to possibly remove it and then reinstall, which solved the problem. In any case, by adding the package above, I was able to correctly execute the MVC 4 project with ACS.

Hope this works for you too.

+2
source

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

Another option is to replace the section with this one that uses the class available in the .Net Framework 4.5 kernel (you should also add a link to System.IdentityModel):

 <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> 
0
source

Source: https://habr.com/ru/post/951971/


All Articles