Windows身份验证不工作 [英] Windows authentication does not work

查看:176
本文介绍了Windows身份验证不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的.NET 4.0 MVC3 Web应用程序安装Windows身份验证,因此内网用户在该公司不会被提示登录。

I am trying to setup Windows authentication in my .NET 4.0 MVC3 web application, so the intranet users in the company can log in without being prompted.

在web.config中我有:

In web.config I have:

<authentication mode="Windows" />
<authorization>
  <deny users = "?" />
</authorization>

在IIS我禁用匿名访问整个Web应用程序和剩下的就只有Windows身份验证检查。我使用IIS 6.0在Windows 2003上。

In IIS I disabled anonymous access for the entire web application and left only Windows authentication checked. I am using IIS 6.0 on Windows 2003.

现在,当我访问了USER \计算机的网站,我登录时没有被提示,但作为一个错误的用户(不是我自己,而是服务器的管理员帐户的Web应用程序是在运行)。

Now, when I access the site from USER\COMPUTER I am logged in without being prompted, but as a wrong user (not myself, but the administrator account of the server that the web app is running at).

当我访问来自USER \ SOMESERVER网站我登录的用户,正如预期。所有其他人试图进入我的应用程序,从他们的计算机上获取用户名和密码的提示(他们可以登录时,他们提供有效凭据虽然)。这是特别奇怪,因为他们都集成Windows身份验证打开了在IE设置和* .domain.intra被添加到Intranet站点。

When I access the site from USER\SOMESERVER I am logged in as USERS, just as expected. All other people trying to access my app from their computers get a prompt for username and password (they can login when they provide valid credentials though). This is especially strange, because they all have integrated windows authentication turned on in IE settings and the *.domain.intra is added to intranet sites.

有没有人有一个想法是怎么回事?我怎样才能使它发挥作用,因此用户身份登录自己没有提示?

Does anyone have an idea what's happening? How can I make it work, so the users are logged in as themselves without being prompted?

修改:Web应用程序池中运行的网络服务,所以我不明白为什么我登录的从我的机器了错误的用户 ...

EDIT: the web application pool runs as NETWORK SERVICE, so I do not understand why I am logged in as a wrong user from my development machine...

EDIT2 :由于我使用网络服务作为应用程序池的身份,我也跟着从这里的解决方法步骤:的 http://support.microsoft.com/kb/871179 。但它仍然无法正常工作......

EDIT2: since I use NETWORK SERVICE as the identity for the app pool, I followed the workaround steps from here: http://support.microsoft.com/kb/871179 . But it still does not work...

所有用户和机器属于同一个域

All users and machines belong to the same domain

EDIT3 :我发现这一点: HTTP://forums.iis .NET /吨/ 1167087.aspx 。他们描述的问题是完全一样的。该解决方案还努力。是仍然存在的唯一问题是,从我的机器,我还是会自动记录在一个错误的用户。幸运的是所有的客户机作为当前用户登录。

EDIT3: I found this: http://forums.iis.net/t/1167087.aspx . The problem they described was exactly the same. The solution also worked. The only problem that still persists is that from my development machine I am still automatically logged in as a wrong user. Fortunately all client machines log in as the current users.

推荐答案

我GOOGLE了更多了一下,发现这一点:的 http://forums.iis.net/t/1167087.aspx 。重新启动该服务器确实解决了这个问题。可悲的是,我们仍然不知道是什么导致它...

I googled a bit more and found this: http://forums.iis.net/t/1167087.aspx. Rebooting the server indeed solved the problem. The sad thing is that we still do not know what was causing it...

这篇关于Windows身份验证不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆