for example if we want to get the logged current user ,
string UserName = Request.ServerVariables["LOGON_USER"];
Server Variable | |
ALL_HTTP | |
ALL_RAW | |
APPL_MD_PATH | |
APPL_PHYSICAL_PATH | |
AUTH_TYPE | |
AUTH_USER | |
AUTH_PASSWORD | |
LOGON_USER | |
REMOTE_USER | |
CERT_COOKIE | |
CERT_FLAGS | |
CERT_ISSUER | |
CERT_KEYSIZE | |
CERT_SECRETKEYSIZE | |
CERT_SERIALNUMBER | |
CERT_SERVER_ISSUER | |
CERT_SERVER_SUBJECT | |
CERT_SUBJECT | |
CONTENT_LENGTH | |
CONTENT_TYPE | |
GATEWAY_INTERFACE | |
HTTPS | |
HTTPS_KEYSIZE | |
HTTPS_SECRETKEYSIZE | |
HTTPS_SERVER_ISSUER | |
HTTPS_SERVER_SUBJECT | |
INSTANCE_ID | |
INSTANCE_META_PATH | |
LOCAL_ADDR | |
PATH_INFO | |
PATH_TRANSLATED | |
QUERY_STRING | |
REMOTE_ADDR | |
REMOTE_HOST | |
REMOTE_PORT | |
REQUEST_METHOD | |
SCRIPT_NAME | |
SERVER_NAME | |
SERVER_PORT | |
SERVER_PORT_SECURE | |
SERVER_PROTOCOL | |
SERVER_SOFTWARE | |
URL | |
HTTP_CONNECTION | |
HTTP_ACCEPT | |
HTTP_ACCEPT_ENCODING | |
HTTP_ACCEPT_LANGUAGE | |
HTTP_AUTHORIZATION | |
HTTP_HOST | |
HTTP_USER_AGENT |
Example to get All Server Variables and it’s value ASP.net
<form id="form1" runat="server"> |
No comments:
Post a Comment