Q:
I want to ask about how to get the Computer name and the account name of the user who making an http request to my web site.according to his request.
When i search i find that:
-
REMOTE_HOSTThe name of the host that is making
the request. If the server does not
have this information, it will set
REMOTE_ADDR and leave this empty.Why the server may never contain the host name? and how can i fix
this? - I use
REMOTE_USER,LOGON_USER,
AUTH_USERto get the account name
but it doesn’t contain any data also
.
You can use the Request.ServerVariables object like
EDIT
If you want to get computer name then try following
EDIT II
//Retrieving Client Machine details
For more server variables check out the following link
IIS Server Variables