Windows authentication keeps asking username password even credentials are correct

16,753

Solution 1

I had a similar issue recently, try ensuring that the windows user has read access to the directory on the server.

Solution 2

Checkk application pool owner in IIS

It should be network services

Solution 3

websso.mydomain.com looks like internet domain name, not intranet domain name because it has sections. According to https://support.microsoft.com/en-us/help/258063/internet-explorer-may-prompt-you-for-a-password you should use domain name without sections (e.g. http://websso/) or add your domain name to security settings of client browsers

Share:
16,753

Related videos on Youtube

Ketan Panchal
Author by

Ketan Panchal

Updated on July 09, 2022

Comments

  • Ketan Panchal
    Ketan Panchal almost 2 years

    I have developed an application to allow windows authentication and hosted it to the live server. in my local pc i am able to get the username password. but when i am accessing from web (e.g. websso.mydomain.com) it keeps asking credentials even after i entered correct credentials.

    <authentication mode="Windows">
    </authentication>
    
    <authorization>
      <deny users="?" />
    </authorization>
    <identity impersonate="true"/>
    

    i have added above tags in web.config, hosting server is windows server 2008 R2. I have tried to get username from

    WindowsIdentity.GetCurrent().Name
    Environment.Username
    Request.ServerVariables["LOGON_USER"]
    Request.ServerVariables["AUTH_USER"]
    HttpContext.Current.Request.LogonUserIdentity.Name
    

    Is there any changes which needs to do in IIS or any steps to follow to configure windows authentication.

    Installed IIS version is 7.5

  • Ketan Panchal
    Ketan Panchal about 10 years
    i have given read and execute access to authenticated users.. isbthere any other group whpm i need to give access?
  • Ketan Panchal
    Ketan Panchal about 10 years
    Is there any group like "Windows users" i did not found any thing like windows users.
  • Aaron D
    Aaron D over 8 years
    Welcome to StackOverflow. Could you give more information on how someone could do this? To make your answer really useful for anyone that might be experiencing this same problem, if you edit your answer to give more detailed steps it would be better.
  • deherch
    deherch over 8 years
    @kbpanchal There is a group called MACHINENAME\Users, and if the machine is in a domain, there should be DOMAINNAME\Domain Users group. @DLeh thanks this solved my issue
  • luiscla27
    luiscla27 almost 5 years
    This worked for me, Thank you! In my case i was using NTLM authentication with Tomcat 8 along with Waffle.