ASP.NET Windows身份验证不工作/不接受凭证 [英] ASP.NET Windows Authentication Not Working/Not Accepting Credentials

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

问题描述

我一直在努力,现在解决了几个星期这一问题通过谷歌和阅读这样了,没有多少运气,所以我想我会尝试终于问自己。

I've been trying to resolve this question for a couple weeks now via Google and reading SO, and not had much luck, so I thought I'd finally try asking myself.

我设置了​​一个非常,非常简单的 ASP.NET 网​​站上我们的内联网生成内部用户的一些信息。我使用的是Windows身份验证,而不是匿名访问,因为根据什么用户点击,我会产生不同的信息网站。

I'm setting up a very, very simple ASP.NET site on our intranet to generate some information for internal users. I'm using Windows authentication, rather than anonymous access, because based on what user hits the site I will be generating different information.

长话短说,这工作完全在测试我的本地 Windows 7的机,其中我公司开发的应用程序。不过,从的Windows 2008 R2服务器,我希望它居住,当我打的网站,我得到一个弹出窗口,询问我的凭据,即使我进入其中它一次又一次地问我他们。发生这种情况不管我在远程或本地击中的部位。如果我尝试使用匿名访问,我可以触及的部位左右逢源但我不能识别用户我无法生成我想提供的信息。

Long story short, this works perfectly in testing on my local Windows 7 machine where I developed the application. However, from the Windows 2008 R2 server where I want it to reside, when I hit the site I get a pop-up asking for my credentials, and even if I enter them it asks me for them again and again. This happens regardless if I'm hitting the site remotely or locally. If I try using anonymous access I can reach the site both ways but as I cannot identify the user I cannot generate the information I would like to provide.

注:


  1. 在IIS中,我有Windows身份验证和ASP.NET模拟
    为站点启用。一切是禁用的。

  1. In IIS, I have Windows Authentication and ASP.NET Impersonation enabled for the site. Everything else is disabled.

有关计算出来的缘故,我现在有web.config中设置为允许所有用户,我不否认任何。

For the sake of figuring it out, I currently have the web.config set to allow all users and am not denying any.

在APPHOST文件,我目前已启用windowsAuthentication。

In the AppHost file, I currently have windowsAuthentication enabled.

            <windowsAuthentication enabled="true">
            <providers>
                <add value="Negotiate" />
                <add value="NTLM" />
            </providers>
            </windowsAuthentication>


诚然,我通常使用窗体身份验证这台服务器为我们所有的其他内部网站上,所以我有点新Windows身份验证和这个问题。在这一点上,我只是不知道什么尝试或者下次检查,因此任何意见​​将是有益的。谢谢你。

Admittedly, I typically use forms authentication on this server for all of our other internal sites so I'm a bit new to windows authentication and this issue. At this point I'm just not sure what to try or check next, so any advice would be helpful. Thanks.

推荐答案

我知道这是一个略显陈旧的话题,但我有这个相同的问题。原来我一直在使用身份的程序池:ApplicationPoolIdentity而不是网络服务。有一次,我的切换(在高级设置中的IIS7.5)我不再有服务器提示额外的凭据和直通完美工作。

I know this is a slightly old topic, but I had this exact same problem. Turns out I had the AppPool using Identity: ApplicationPoolIdentity instead of NetworkService. Once I switched that (under Advanced Settings in IIS7.5) I no longer got the server prompting for additional credentials and the pass-through worked perfectly.

希望帮助!

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

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