Author: persistentDeveloper | Posted on: 4/20/2009 4:23:24 AM | Views : 377

 Hi
Below code does display the welcome message with windows user name. It works on local machine (ASP.NET page) , after moving the web application to web server windows 2008 it is not displaying that Welcome message anymore.
 
System.Security.Principal.WindowsPrincipal p = System.Threading.Thread.CurrentPrincipal as System.Security.Principal.WindowsPrincipal;
string strName = p.Identity.Name.Replace("\\", "Welcome ").ToUpper();
//lable4 to strName
if (strName != null)
Label4.Text = strName;
 
  Your input is appreciated.

...

Go to the complete details ...