Search code examples
asp.net-mvcsecurityclaims-based-identityfederated-identityclaims

Scripts and styles are not not working in claims based identity


I am an ASP.Net MVC application that uses claims based identity. I created a security token service (STS) for authentication. My MVC application is hosted on IIS default website. My application is working perfectly. But scripts are not working. Currently I have disabled anonymous authentication (which is a the requirement). Thank you.

Error Message: enter image description here


Solution

  • Finally I got the solution.

    For claims based identity, We have to configure on webconfig as follows:

    <modules>
          <remove name="FormsAuthentication" />
          <add name="WSFederationAuthenticationModule" type="System.IdentityModel.Services.WSFederationAuthenticationModule, System.IdentityModel.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"  preCondition="integratedMode" />
          <add name="SessionAuthenticationModule" type="System.IdentityModel.Services.SessionAuthenticationModule, System.IdentityModel.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" preCondition="integratedMode" />
        </modules>
    

    It will work.

    Thank you all.............