Question

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

Was it helpful?

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.............

OTHER TIPS

You should allow access to scripts folder to all requests, add this to web.config. Allow access to CSS folder also in the same way.

<location path="Scripts">
    <system.web>
      <authorization>
        <allow users="*" />
      </authorization>
    </system.web>
</location>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top