Search code examples
securityauthenticationiisiis-7.5windows-server-2008

No login prompt at all for Windows Authentication on domain


I'm trying to get a login prompt to appear on a website when you visit from any browser, any computer.

I'm using IIS 7.5 on Windows Server 2008. I've setup the Windows user. I've gone to the authentication section of the domain in IIS manager, everything is disabled except Windows Authentication, which is enabled (didn't change any other settings).

When I visit the website, no prompt comes up and I just get:

401 - Unauthorized: Access is denied due to invalid credentials.

I've looked through multiple threads, I can't find anything relating to 'no login prompt at all'

Edit: I've followed these steps with no success: http://technet.microsoft.com/en-us/library/cc754628(v=ws.10).aspx


Solution

  • Finally! After a few attempts and failures, I've figure this out. For some reason when I installed Basic Authentication as a role in the Server Manager (followed these steps), my applicationHost.config file didn't actually update. I'm not sure why but under these two sections; <globalModules> and <modules> I needed to manually add some lines to get basic authentication to work.

    I'm showing the entire tree so if anyone needs this, they can find it. I added the line within the section:

    <configuration>
        <system.webServer>
    
            <globalModules>
                <add name="BasicAuthenticationModule" image="%windir%\System32\inetsrv\authbas.dll" />                
            </globalModules>
    
        </system.webServer>
    </configuration>
    

    And another line within the section:

    <configuration>
        <location path="" overrideMode="Allow">
            <system.webServer>
    
                <modules>
                    <add name="BasicAuthenticationModule" lockItem="true" />                    
                </modules>
    
            </system.webServer>
        </location>
    </configuration>
    

    Once this was done and I continued with the steps I posted above to disable anonymous auth and enable basic auth, the login prompt finally came up.

    And there was much rejoicing :D