我们有一个网站,只能通过authentication的活动目录用户访问。 进入网站时应该发生的第一件事是提示inputWindows凭据。
为了实现这一点,我们只启用了Windows身份validation并启用了模拟。
它在configuration中看起来像这样:
<system.web> <identity impersonate="true"/> <authentication mode="Windows"></authentication> </system.web>
在IIS中显示如下:

但是 ,无论何时导航到页面,我都不会提示凭据,而是使用服务器名称作为用户。
我还能改变什么?
我们正在使用Windows Server 2012 R2 Datacenter
我们正在使用Internet Information Services v 8.5
这是一个使用.NET 4.5 Integrated的ASP.NET MVC应用程序
我希望只要有人碰到这个页面就能得到这个: 
我们的问题实际上是我们使用集成Windows身份validation ,它自动将login用户的凭据传递给服务器。
为了提示用户input凭据,我们启用了基本身份validation ,将login信息传递给服务器,服务器使用login信息和Windows活动目录进行身份validation。
去除
<identity impersonate="true"/>
重新启动Web服务器,它会提示您inputlogin名/密码。