문제

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