简体   繁体   English

ASP.NET Windows Authentication works with IP address in URL, but not dns

[英]ASP.NET Windows Authentication works with IP address in URL, but not dns

I've set up an ASP.NET intranet website with我已经建立了一个 ASP.NET 内网网站

From another pc: It works perfectly fine if I access it via IP eg http://11.11.11.1:88/Default.aspx从另一台电脑:如果我通过 IP 访问它,它工作得很好,例如http://11.11.11.1:88/Default.aspx

Unfortunately, when I go to http://MyWebsite.mycompany.com:88/Default.aspx I get a login box popping up.不幸的是,当我从 go 到http://MyWebsite.mycompany.com:88/Default.aspx时弹出一个登录框。

If I enter username/pass it just rejects it, and I can't get access如果我输入用户名/通过它只是拒绝它,我无法访问

From the server: Both IP and DNS alias work.从服务器: IP 和 DNS 别名都有效。 So no problems while on the server itself所以在服务器本身上没有问题

Anonymous user access is disabled匿名用户访问被禁用

Any ideas?有任何想法吗?

Any suggestions on what further info I can give to help solve this?关于我可以提供哪些进一步信息来帮助解决这个问题的任何建议?

Additional:额外的:

  • Accessed via IE only (6 and up)仅通过 IE 访问(6 及以上)
  • I use IIS 6.0我使用 IIS 6.0
  • Username in Domain\Username format域\用户名格式的用户名
  • Config set to <deny users="?">配置设置为<deny users="?">
  • AppPool identity as Domain\zWhatever (used for windows auth to sql db) AppPool 标识为 Domain\zWhatever(用于 windows 对 sql db 的身份验证)
  • AppPool identy user is in IIS_WPG group, plus is admin on server AppPool 身份用户在 IIS_WPG 组中,并且是服务器上的管理员

Ohh riiight.哦,对了。 Got it!知道了!

I changed my AuthenticationProvider for my website from "Negotiate, NTLM" to "NTLM, Negotiate"我将网站的 AuthenticationProvider 从“协商,NTLM”更改为“NTLM,协商”

Following these instructions: http://support.microsoft.com/kb/215383遵循这些说明: http://support.microsoft.com/kb/215383

With a slight change to their instruction to set provider of course稍微改变他们设置提供者的指令当然

mine:矿:

cscript adsutil.vbs set w3svc/WebSite/root/NTAuthenticationProviders "**NTLM, Negotiate**"

You can get the Website ID by clicking on the "Web Sites" folder on the left in IIS.您可以通过单击 IIS 左侧的“Web Sites”文件夹来获取网站 ID。 This should list all your website with their ID这应该列出您的所有网站及其 ID

In Internet Explorer options, add MyWebsite.mycompany.com to your list of Trusted Sites .在 Internet Explorer 选项中,将MyWebsite.mycompany.com添加到您的受信任站点列表中。

In Internet Explorer:在 Internet Explorer 中:

  • select "Tools" select“工具”
  • select "Internet Options" select“互联网选项”
  • click the "Security" tab单击“安全”选项卡
  • click the "Trust Sites" icon单击“信任站点”图标
  • click the "Sites" button单击“站点”按钮
  • enter the website domain输入网站域名
    • eg, http://MyWebsite.mycompany.com:88 (use https if possible)例如, http://MyWebsite.mycompany.com:88 (如果可能,使用https
    • if the website doesn't have SSL, un-check "Require server verification (https:)"如果网站没有 SSL,请取消选中“需要服务器验证 (https:)”
  • click the Add button (don't forget this part)单击添加按钮(不要忘记这部分)

For Firefox, it's also pretty simple to configure NTLM authentication .对于 Firefox,配置 NTLM 身份验证也非常简单。

For Chrome NTLM, see this thread .对于 Chrome NTLM,请参阅此线程

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM