Reputation: 15
I asked few people in work, but noone could help me. So here it is.
I'm on domain. Windows authentication. Deny anonymous.
I start my app on local webdev server. Then try to access it. So...
<%= Page.User.Identity.Name %>
<%= HttpContext.Current.User.Identity.Name %>
in my .aspx page..
When I access this (in this example I just want to see my name of logged user), I get my username, just like expected. But when I want to "test" my app - still running in first account - and I access it in another browser (no, I'm not stupid, ofcourse under another windows accout, made for testing) I'm getting the first username still. So the problem is: User.Identity.Name returns name of user where I started the app, not name of user who accessed it via browser.
Any tips? :)
Have a nice day
Upvotes: 0
Views: 454
Reputation: 48279
The accepted answer (as suggested by comments above the question) would be:
The integrated web server doesn't handle Windows authentication properly. IIS should do better and recognize different users. The source of the problem is then the integrated web server.
Upvotes: 1
Reputation: 124746
Output Caching is a common cause: user B might be getting a cached copy of the page generated for user A.
Upvotes: 0