Author: Gatepark | Posted on: 3/25/2009 5:27:54 PM | Views : 267

I am using.....

HttpContext.Current.User.Identity.Name

in my vb codebehind to get the user name which then gets added to a record in my database. When I debug the application in VWD everything works OK. However, when accessing the site in a production environment from other machines on the LAN, it returns a null value. Perhaps even odder, if I access the development copy of the site from I.E. on my development machine (as opposed to using the debugger) I get the same problem.

I am using Windows Authentication rather than a Membership Provider. 

Why is it that this construct works when addressing the site via \\localhost but it doesn't work when accessing the site in an IIS production environment?

 

 
...

Go to the complete details ...