Iis – Unable to access the IIS website using hostname. Works fine with localhost

iis

I am unable to access my IIS website or even the default website. I did a bit of research and checked/selected the option 'Integrate Windows Authentication' in the Properties > Directory Service tab.

From then on I could access the website using localhost. But when I use my hostname, it asks for domain username/password. Why is it so?

I don't understand why am I not able to access my website without checking this option to integrate windows authentication?

My goal is to access the website using both localhost and hostname.

More details on what I did:

I haven't done anything out of world. What I did is: IIS -> Websites -> Create new Website -> Create a working folder -> Set a default page. I restart this website and then click on browse. And I do not see my default page. I had to go to Directory Service tab and select the check box "Integrate Windows Authentication". Then I can see the default page coming. On IE too I can see the default page coming when I use http://localhost. But when I use http://{hostname} it asks for domain username and password. Why???

Best Answer

You probably have a permission missing on the site so that the anonymous user doesn't work. Check the security tab and check which anonymous user is assigned and grant that user read (or write if you need it) permissions to disk. Then it should use the anonymous account, which is the option it will use as long as the anonymous account has enough permissions.

For further details, you can watch week 23 from this series: http://dotnetslackers.com/projects/LearnIIS7/. While it's for IIS7, it's the same concepts for IIS6.