Handling duplicate SystemIdentity.Model error

Follow

Problem

Applications which handle their own authorization or defer directly to off-platform authorization services like Site Minder sometimes encounter an error on execution

500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.

If you navigate to the app in IIS Manager and try to edit configuration, you will see an error like: 

The line in question looks like:

<section name="system.identityModel" type="System.IdentityModel.Configuration.SystemIdentityModelSection, System.IdentityModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />

Removing this "duplicate" line leads to the app failing to promote:

Configuration system failed to initialize
Unrecognized configuration section system.identityModel. (C:\ApprendaPlatform\SiteData\sup139willnotpromote--v1\root\web.config line 699)


Solution

The platform has a case-sensitive filter for system.IdentityModel which can be defeated by changing the PublicKeyToken value to lower case:

<section name="system.identityModel" type="System.IdentityModel.Configuration.SystemIdentityModelSection, System.IdentityModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />

 

 

Have more questions? Submit a request

Comments