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

Kevin Jensen picture Kevin Jensen · Feb 15, 2011 · Viewed 33k times · Source

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 /Account/Login when I have no trace of that in my application and my web.config is configured to windows auth.

Any ideas?

Here is my entire web.config file: http://pastie.org/1568510

Answer

Liam picture Liam · Mar 11, 2011

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.