Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unrecognized configuration section system.identityModel

I keep getting this error when building:

Unrecognized configuration section system.identityModel

I have added the following to my config:

<system.identityModel>
    <identityConfiguration>
      <audienceUris>
        <add value="TEST"/>
      </audienceUris>
      <issuerNameRegistry type="System.IdentityModel.Tokens.ConfigurationBasedIssuerNameRegistry, System.IdentityModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
        <trustedIssuers>
          <add thumbprint="1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234" name="YourSTSName"/>
        </trustedIssuers>
      </issuerNameRegistry>
      <certificateValidation certificateValidationMode="None"/>
    </identityConfiguration>
  </system.identityModel>

I am using .Net 4.6

like image 247
Chris Avatar asked Aug 10 '16 15:08

Chris


1 Answers

You forgot this entry in configSections...

<configSections>
    <!--WIF sections -->
    <section name="system.identityModel" type="System.IdentityModel.Configuration.SystemIdentityModelSection, System.IdentityModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
    <section name="system.identityModel.services" type="System.IdentityModel.Services.Configuration.SystemIdentityModelServicesSection, System.IdentityModel.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</configSections>
like image 83
diegodsp Avatar answered Nov 01 '22 13:11

diegodsp