Windows authentication asking for login and logging in wrong user

Justin Lilly 1 Reputation point
2022-04-22T12:35:13.537+00:00

I am using windows authentication on an intranet that has been duplicated for two different environments with different servers being accessed. I am using a domain without periods rather than IP so it should log in automatically but it prompts for a login on site 1. On site 2 it prompts for a login, but regardless of which user logs in, WindowsIdentity.GetCurrent().Name always returns my login which was the very first login rather than the current user.

Here is my configuration:

Anonymous authentication: disabled

Windows authentication: enabled

web.config:

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

<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
</system.webServer>

Why is it prompting for a login and why is one instance logging in properly and the other not?

Internet Information Services
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Justin Lilly 1 Reputation point
    2022-04-22T14:20:44.367+00:00

    Made the mistake of setting a user when the application was created. It is working now.

    0 comments No comments