I’ve run into an issue and I can’t identify what the difference is between App 1 and App 2. Both Apps execute the exact same line of code below from the Session_Start() in the Global.asax. One app identifies the user correctly DOMAIN\USER, the other app simply returns ''…
UserService.GetUserInfo(Context.User.Identity.Name.ToString());
Both apps have this in the Web.config for using Windows Authentication.
<authentication mode="Windows"></authentication>
You can test it with IIS Express locally which supports Windows authentication. So in your web.config you must have the following:
and in the properties of the project configure IIS Express to enable Windows Authentication:
Anonymous Authenticationmust be set toDisabledandWindows Authenticationmust be set toEnabled.