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

有帮助吗?

解决方案

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

其他提示

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>
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top