Request.ServerVariables("LOGON_USER")
it will work only when Windows Integrated Authentication is turned on and Anonymous
Access is turned off.
in this case, the Request.ServerVariables("LOGON_USER") will return the network
account of the user, thus it will work only in Intranet environment or only when
the person is connected via VPN to the server.
if you have Login form through which the user is logging in, that variable is useless
and meaningless and the common way to store the user is what bigmike said, using
ordinary session variable.
will give the visitor IP address and in cases this will be affected by firewalls and proxy servers of commercial companies
Is there another code you can write that is not affected by proxy servers and that? I am in my website converting my visitors IP'addresses to lng & lat coordinates and some times they are not showing the correct data. What would you suggest in this scenario?
Is there another code you can write that is not affected by proxy servers and that? I am in my website converting my visitors IP'addresses to lng & lat coordinates and some times they are not showing the correct data. What would you suggest in this scenario?
BatutaBunsin...
Member
60 Points
145 Posts
HttpContext.Current.Request.ServerVariables Parameters
May 20, 2009 06:06 AM|LINK
Whats the difference between these three parameters:
HttpContext.Current.Request.ServerVariables("REMOTE_USER")
HttpContext.Current.Request.ServerVariables("LOGON_USER")
HttpContext.Current.Request.ServerVariables("AUTH_USER")
venkatu2005
All-Star
32487 Points
6742 Posts
Re: HttpContext.Current.Request.ServerVariables Parameters
May 20, 2009 06:28 AM|LINK
get internet host server name.
HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];
will give the visitor IP address and in cases this will be affected by firewalls and proxy servers of commercial companies
Thanks.
venkatu2005
All-Star
32487 Points
6742 Posts
Re: HttpContext.Current.Request.ServerVariables Parameters
May 20, 2009 06:32 AM|LINK
Request.ServerVariables("LOGON_USER")
it will work only when Windows Integrated Authentication is turned on and Anonymous
Access is turned off.
in this case, the Request.ServerVariables("LOGON_USER") will return the network
account of the user, thus it will work only in Intranet environment or only when
the person is connected via VPN to the server.
if you have Login form through which the user is logging in, that variable is useless
and meaningless and the common way to store the user is what bigmike said, using
ordinary session variable.
Thanks.
sumitd
Star
12168 Points
2151 Posts
Re: HttpContext.Current.Request.ServerVariables Parameters
May 20, 2009 06:33 AM|LINK
REMOTE_USER: Returns an unmapped user-name string sent in by the user
LOGON_USER: Returns the Windows account that the user is logged into
AUTH_USER: Returns the raw authenticated user name
Reference: http://www.w3schools.com/asp/coll_servervariables.asp
Visit: www.msblogdirectory.com
www.dotnetspeaks.com
venkatu2005
All-Star
32487 Points
6742 Posts
Re: HttpContext.Current.Request.ServerVariables Parameters
May 20, 2009 06:34 AM|LINK
http://www.aspcode.net/List-of-RequestServerVariables.aspx
Thanks.
mudassarkhan
All-Star
78956 Points
13402 Posts
MVP
Re: HttpContext.Current.Request.ServerVariables Parameters
May 20, 2009 07:04 AM|LINK
Here is a good article will all information
http://www.4guysfromrolla.com/webtech/092298-3.shtml
Contact me
Jennica
Member
500 Points
341 Posts
Re: HttpContext.Current.Request.ServerVariables Parameters
Jun 08, 2010 11:51 AM|LINK
Is there another code you can write that is not affected by proxy servers and that? I am in my website converting my visitors IP'addresses to lng & lat coordinates and some times they are not showing the correct data. What would you suggest in this scenario?
venkatu2005
All-Star
32487 Points
6742 Posts
Re: HttpContext.Current.Request.ServerVariables Parameters
Jun 08, 2010 12:12 PM|LINK
You want the Client IP address or any ?
Thanks.