Reputation: 13271
When I try to access my page I only get redirected to login.aspx, which is not what's intended.
What I'm after is instead a windows login popup where I authenticate if my current logged in user is not allowed, and if it is, it goes straight to the application.
I'm running a MVC4 project on an IIS6 webserver (yeah, I know.).
I've disabled "Enable anonymous access" in Directory Security - Authentication and access control and checked in "Integrated Windows authentication".
My web.config looks as follows:
<authorization>
<allow roles="DOMAIN\Role1"/>
<deny users="*"/>
<deny users="?"/>
</authorization>
<compilation targetFramework="4.0" debug="true"/>
<authentication mode="Windows">
</authentication>
Any clues?
Upvotes: 3
Views: 10053
Reputation: 13271
I finally figured this out, by finding this stackoverflow question:
ASP.NET MVC3 and Windows Auth on IIS keeps redirecting to /Account/Login
By removing the references WebMatrix.Data.dll and/or WebMatrix.WebData.dll it worked as intended.
Upvotes: 7