Getting the user name

  • Thread starter Thread starter Helen Trim
  • Start date Start date
H

Helen Trim

I have upgraded a Web application from Visual Studio 2003 to 2008. A line of
code that was working now returns an empty string:

UserName = System.Web.HttpContext.Current.User.Identity.Name

The application was running under .NET 1.1 and is now .NET 2.0

Can anyone tell me what the code should be to read the user's login name?

Thank you,
Helen
 
Sorry, please ignore this. I had Anonymous Access set to on for the new web
site. I turned it off and it is working now.

Doh!
 
Back
Top