ASP.NET MVC3 and Windows Auth on IIS keeps redirecting to /Account/Login

后端 未结 13 3191
没有蜡笔的小新
没有蜡笔的小新 2020-11-28 03:27

I\'m running MVC3 and a windows auth web application. When I deploy to IIS6 it runs great until I hit a page that requires authentication. It then is auto-redirecting to /

13条回答
  •  旧时难觅i
    2020-11-28 03:52

    I had the same issue in my MVC4 project, only my project has Anonymous Authentication disabled outright, so Windows Authentication is always required.

    I have no WebMatrix.* in my bin folder, and adding the autoFormsAuthentication and enableSimpleMembership keys to appSettings didn't do it for me.

    Instead, I had to comment out the following:

    
        
    
    

    And replace it with this:

    
    

    That did the trick.

提交回复
热议问题