Windows Authentication only works with host write

I am setting up a website (ASP.NET) for internal use in my company. In IIS, I've enabled Integrated Windows Authentication and disabled anonymous access. As soon as I do this, the screen will display the "Enter your username / password" field whenever you visit the site, but do not log in, even if the username / password is correct. This happens even if you are logged into your computer with a domain account and not a local account.

However, if I enter the site's IP address in my hosts file, the site works fine (logs in a user without any additional task).

I have two questions.

1) Why does this entry affect hosts?

2) How can I make the site do well without a) getting everyone to edit their hosts file or b) a site challenging them and not logging them?

EDIT: I checked and we have our DNS server to point these urls to the correct servers. Therefore, the correct IP address is displayed to check if the IP address is correct. However, it seems that in addition to the DNS record, we also need to have a hosts file record for the site to work.

+1


a source to share


4 answers


So ... we made it work. Here's what happened.

While browsing the DNS Manager on test.DOMAINNAME.com, a colleague of mine noticed that another site on the same server was configured as a "Host (A)" record, while the site we were working on was set as a "Alias ​​(CNAME ) ". Several other sites on this computer were also configured as alias records, and he mentioned that one site with a Host record was "durable" and had sporadic problems with at least one other site that was configured as an alias.



We talked to the AD / DNS admin and as a test he switched our records from Alias ​​to Host, and once we cleared our local DNS caches, it worked fine (without entering records in our .hosts file).

So the question is still being sorted. It was a Win2k3 block serving as one of the three internal DNS servers and this modification fixed our problem. If anyone can add any additional information, we would be very grateful, but in the meantime we are discussing the issue of returning and fixing all our other sites.

0


a source


You probably have a Kerberos authentication issue.

Since you are using the URL Site.DomainName.com, I am assuming DomainName.com is your AD name as well.

On the server that is running IIS, copy SetSPN.EXE from the resource kit tools and run the following:



setspn -A http/site.domainname.com IISServerName

      

Where SITE is your URL and IISServerName is the server name.

+1


a source


It looks like a dns issue. Does the dns server know about the hostname you are using? It looks like the dns server doesn't know the direct lookup (hostname to ip) for the host you are trying to connect to.

0


a source


We recently created an intranet site with Windows authentication. The networking guys set up group policy and drag and drop it into IE and Firefox.

For IE, he added the site to the Intranet Sites, and for Firefox, he changed the config file so that our intranet .. COM would be trusted.

0


a source







All Articles