Hi Experts,
In my ASP.Net application, I am using windows integrated authentication. I get a login dialog box when trying to access the page in which I enter the correct LDAP username and password. In one of my pages, I want to access the user who logged into the application.
I use the following code to get the username
Code:
string UserID = Request.ServerVariables["AUTH_USER"].ToString();
if (UserID.Trim() == "")
UserID = Request.ServerVariables["LOGON_USER"].ToString();
so I use AUTH_USER or LOGON_USER whichever is available. I used this method because, in one of my test servers the 1st one was not available.
Now comming to the actual problem, I am not getting either of these values in the production server. Am I missing out something?? Or is there a better way of doing the same??
Please give me your valid suggestions
Regards
Ganesh