简体   繁体   中英

IIS Website working using localhost but not with IP Address or domain names

I have an issue accessing a .NET website that I have configured to use Windows authentication (Site works fine with forms authentication) . I get a 401 authorised message back every time I try accessing the site using a proper domain name or IP address but the site works as expected when accessed over localhost

以下是我的web.config(身份验证节点)

通过Localhost访问站点

在IIS中启用Windows身份验证/ ASP.net模拟

I have made a few changes to the applicationhost.config but none has given me the desired results. 对ApplicationHost.config

I have also tried to items mentioned in the below URLs, but without much luck. https://support.microsoft.com/en-gb/help/896861/you-receive-error-401-1-when-you-browse-a-web-site-that-uses-integrate

https://support.microsoft.com/en-us/help/303650/intranet-site-is-identified-as-an-internet-site-when-you-use-an-fqdn-o

https://support.microsoft.com/en-us/help/258063/internet-explorer-may-prompt-you-for-a-password

If anyone of you have encountered this issue, please assist.

FYI, I have hosted this site on AWS and for test purposes have enabled incoming https/https traffic from all IPs. Server : Windows server 2016 IIS : IIS 10

I was finally able to get this to work by switching over to Kerberos from NTLM and by creating appropriate SPN entries. Also had to add the site to Local intranet sites

Below is the link that I referred.

https://blogs.msdn.microsoft.com/chiranth/2014/04/17/setting-up-kerberos- 
authentication-for-a-website-in-iis/

https://blogs.msdn.microsoft.com/askie/2012/06/05/how-to-configure-internet-explorer- 
security-zone-sites-using-group-polices/

Had to additionally do this for Firefox

Enter about:config and modify a couple of entries.
network.negotiate-auth.delegation-uris
network.negotiate-auth.trusted-uris
network.automatic-ntlm-auth.trusted-uris
Enter my domain on these settings

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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