question

JustinLilly-6262 avatar image
0 Votes"
JustinLilly-6262 asked JustinLilly-6262 answered

Windows authentication asking for login and logging in wrong user

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?

windows-server-iis
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

JustinLilly-6262 avatar image
0 Votes"
JustinLilly-6262 answered

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

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.