MS Identity and Access Tool MVC 4

后端 未结 3 1637
说谎
说谎 2021-01-13 02:07

This VS 2012 extension is meant to allow me to add a local Development STS to my MVC application http://visualstudiogallery.msdn.microsoft.com/e21bf653-dfe1-4d81-b3d3-795cb1

相关标签:
3条回答
  • 2021-01-13 02:47

    Removing FormsAuthentication module worked for me.

     <httpModules>
        ...
        <remove name="FormsAuthentication" />
     </httpModules>
    
    0 讨论(0)
  • 2021-01-13 02:53

    In my case I added this

    <system.web>
    ...
    <httpModules>
    ...
        <remove name="FormsAuthentication" />
    </httpModules>
    </system.web>
    

    and this

    <system.webServer>
    ...
       <modules>
       ...
          <remove name="FormsAuthentication" />
       </modules>
    </system.webServer>
    

    EDIT

    The next problem you might get is this

    A claim of type 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier' or 'http://schemas.microsoft.com/accesscontrolservice/2010/07/claims/identityprovider' was not present on the provided ClaimsIdentity. To enable anti-forgery token support with claims-based authentication, please verify that the configured claims provider is providing both of these claims on the ClaimsIdentity instances it generates. If the configured claims provider instead uses a different claim type as a unique identifier, it can be configured by setting the static property AntiForgeryConfig.UniqueClaimTypeIdentifier.

    add these 2 claims to the Development STS in the Identity and Access Tool

    http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier
    http://schemas.microsoft.com/accesscontrolservice/2010/07/claims/identityprovider

    and add this line to your Global.asax

    AntiForgeryConfig.UniqueClaimTypeIdentifier = ClaimTypes.NameIdentifier;
    

    This article helped me

    0 讨论(0)
  • 2021-01-13 02:57

    I had a similar problem with my MVC4 application on local IIS Express.

    It turned out that Windows Authentication was enabled for the project. Disabling Windows Authentication (in project properties pane -- press F4) fixed the problem.

    0 讨论(0)
提交回复
热议问题