Search code examples
iiswindows-authentication

Using windows authentication how to Remove login prompt in Internet Explorer when website is host on IIS


When i host an application on IIS and set the windows authentication, after doing all configuration it will still prompt for credentials.

I followed the below steps to allow automatic login with Internet explorer :

  1. Open Internet explorer go to Settings > Select the "Security" tab

  2. Select "Local Intranet" and select the "Custom Level" button

  3. Scroll down to "User Authentication" > "Logon"

  4. Check the box next to "Enable logon in intranet zone only"

  5. Restart IE.

When I open my application it will still prompt for login.

I have added web config settings to allow Windows authentication as below :

<system.web>
<authentication mode="Windows"/>
<authorization>
<deny users="?"/>
<allow users="*"/>
</authorization>
</system.web>

I m hosted my website on http://192.192.8.52:8089/ Check if required. Please let me know where I am going wrong.

Thanks.


Solution

  • Think about how you are navigating to your intranet site. You're navigating by IP address. If you do a tracert 192.192.8.52 in command prompt, you'll see that you are ignoring your DNS and navigating directly to the computer. You need to create a Forward Lookup Zone in your DNS Manager so the user is passed through the DNS.

    In your DNS Manager, under Forward Lookup Zones -> YourDomain, create a New Host (A)... which points to 192.192.8.52. Then use that HostName you just created to navigate to your server http://HostNameYouMade. You can't be automatically authenticated through DNS unless you touch the DNS to get to the page. If you're going by IP, then you bypass the DNS and go straight to the computer (server).

    After you're done, you can see with tracert HostNameYouMade that it will touch the DNS and resolve its IP. Your site should now know that a DNS user is connecting to a DNS host and is authenticated or not.