asp.net - 使用 Windows 身份验证,但被重定向到表单例份验证登录页面?

标签 asp.net iis-7 forms-authentication windows-authentication windows-server-2008-r2

我们正在运行 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 SOKnown Issues来自 MVC3 发行说明。

关于asp.net - 使用 Windows 身份验证,但被重定向到表单例份验证登录页面?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5068129/

相关文章:

javascript - 结合 Angular 模板以减少请求的策略?

c# - Web 应用程序 - 仪表板类型 GUI - 界面

c# - 系统参数异常 : The table type parameter must have a valid type name

eclipse - REST Web 服务中基于表单的身份验证

asp.net - 如何在 iTextSharp 中显示水平线

asp.net - 当我使用 ASP.NET 流式传输文件时,为什么 IIS7 会忽略我的内容类型 header ?

c# - 如何管理更快地加载 aspx 页面?

asp.net - 在 SDL Tridion 2011 中上传 JSON 文件作为多媒体组件

asp.net-mvc - Silverlight、SSL、HTTPS、WCF、MVC 和表单例份验证

asp.net - 如何为 Web API GET 请求指定用户名和密码