all groups > dotnet web services > march 2007 >
You're in the

dotnet web services

group:

HttpContext.Current.Request.ServerVariables["LOGON_USER"];


HttpContext.Current.Request.ServerVariables["LOGON_USER"]; Brad King
3/1/2007 12:22:10 PM
dotnet web services:
I recentlly converted some web services to 2.0. So far everything has worked
great with the exception of one of the functions in an AD service.

the following code:
string sUser = HttpContext.Current.Request.ServerVariables["LOGON_USER"];

Worksk fine if debugging in VS 2005 but when I publish to the server. An
empty string is returned. I have tried to catch an error and does not appear
to be one.

Re: HttpContext.Current.Request.ServerVariables["LOGON_USER"]; Mariano Omar Rodriguez
3/7/2007 6:02:18 PM
Use Thread.CurrentPrincipal.Identity.Name instead.

[quoted text, click to view]
AddThis Social Bookmark Button