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

Check whether you have WebMatrix.Data.dll and/or WebMatrix.WebData.dll deployed in the bin directory of your application. If they are there (and you know you don't use them) then try removing them and accessing a page that requires authentication.


In RTM try to add to <appSettings> in Web.config:

<add key="enableSimpleMembership" value="false" />

(Thx to Problem exclusively using Windows Authentication in ASP.NET MVC 3 Beta.)


Not sure if you still have the issue or not, but try adding

<add key="autoFormsAuthentication" value="false" />

to your web.config under appSettings. According to here and here, that should solve your problem.


Try override WebMatrix.dll default for login url by adding this to your appSettings (web.config) :

<add key="loginUrl" value="~/Account/LogOn"/>

WebMatrix.dll set the login Url to /Account/Login, if this key isn't set in the config file... It works for me.