我们正在运行 IIS7 并启用了 Windows 身份验证。其他一切都被禁用。但是,当我们转到该页面时,不会提示我们进行 Windows 登录,而是重定向到默认的表单例份验证登录页面 (Account/Login?ReturnUrl=%2f)。
有什么想法吗?谢谢。
最佳答案
还有这个:
<authentication mode="Windows"></authentication>
<authorization>
<allow users="*"/>
</authorization>
您可能还需要这两个 appSettings
:
<appSettings>
<add key="autoFormsAuthentication" value="false" />
<add key="enableSimpleMembership" value="false"/>
</appSettings>
参见 this answer on SO和 Known Issues来自 MVC3 发行说明。
关于asp.net - 使用 Windows 身份验证,但被重定向到表单例份验证登录页面?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5068129/