web 2.0

ASP.NET(vb.net) Request.ServerVariables() - Request Object

ASP.NET(vb.net) Request.ServerVariables() - Request Object - Request.ServerVariables() : The ServerVariables collection retrieves the values of predetermined environment variables and request header information.

ShotDev Focus:
- ASP.NET(vb.net) Request.ServerVariables() - Request Object

Syntax


Request.ServerVariables(server environment variable)

Example

AspNetRequestServerVariables.aspx

<%@ Page Language="VB" %>
<script runat="server">
Sub Page_Load(sender As Object, e As EventArgs)
Response.write ("<br>ALL_HTTP=" & Request.ServerVariables("ALL_HTTP"))
Response.write ("<br>ALL_RAW="&Request.ServerVariables("ALL_RAW"))
Response.write ("<br>APP_POOL_ID="&Request.ServerVariables("APP_POOL_ID"))
Response.write ("<br>APPL_MD_PATH="&Request.ServerVariables("APPL_MD_PATH"))
Response.write ("<br>APPL_PHYSICAL_PATH="&Request.ServerVariables("APPL_PHYSICAL_PATH"))
Response.write ("<br>AUTH_PASSWORD="&Request.ServerVariables("AUTH_PASSWORD"))
Response.write ("<br>AUTH_TYPE="&Request.ServerVariables("AUTH_TYPE"))
Response.write ("<br>AUTH_USER="&Request.ServerVariables("AUTH_USER"))
Response.write ("<br>CACHE_URL="&Request.ServerVariables("CACHE_URL"))
Response.write ("<br>CERT_COOKIE="&Request.ServerVariables("CERT_COOKIE"))
Response.write ("<br>CERT_FLAGS="&Request.ServerVariables("CERT_FLAGS"))
Response.write ("<br>CERT_ISSUER="&Request.ServerVariables("CERT_ISSUER"))
Response.write ("<br>CERT_SECRETKEYSIZE="&Request.ServerVariables("CERT_SECRETKEYSIZE"))
Response.write ("<br>CERT_SERIALNUMBER="&Request.ServerVariables("CERT_SERIALNUMBER"))
Response.write ("<br>CERT_SERVER_ISSUER="&Request.ServerVariables("CERT_SERVER_ISSUER"))
Response.write ("<br>CERT_SERVER_SUBJECT="&Request.ServerVariables("CERT_SERVER_SUBJECT"))
Response.write ("<br>CERT_SUBJECT="&Request.ServerVariables("CERT_SUBJECT"))
Response.write ("<br>CERT_KEYSIZE="&Request.ServerVariables("ALL_HTTP"))
Response.write ("<br>CONTENT_LENGTH="&Request.ServerVariables("CONTENT_LENGTH"))
Response.write ("<br>CONTENT_TYPE="&Request.ServerVariables("CONTENT_TYPE"))
Response.write ("<br>GATEWAY_INTERFACE="&Request.ServerVariables("GATEWAY_INTERFACE"))
Response.write ("<br>HTTP_ACCEPT="&Request.ServerVariables("HTTP_ACCEPT"))
Response.write ("<br>HTTP_ACCEPT_ENCODING="&Request.ServerVariables("HTTP_ACCEPT_ENCODING"))
Response.write ("<br>HTTP_ACCEPT_LANGUAGE="&Request.ServerVariables("HTTP_ACCEPT_LANGUAGE"))
Response.write ("<br>HTTP_CONNECTION="&Request.ServerVariables("HTTP_CONNECTION"))
Response.write ("<br>HTTP_COOKIE="&Request.ServerVariables("HTTP_COOKIE"))
Response.write ("<br>HTTP_HOST="&Request.ServerVariables("HTTP_HOST"))
Response.write ("<br>HTTP_METHOD="&Request.ServerVariables("HTTP_METHOD"))
Response.write ("<br>HTTP_REFERER="&Request.ServerVariables("HTTP_REFERER"))
Response.write ("<br>HTTP_URL="&Request.ServerVariables("HTTP_URL"))
Response.write ("<br>HTTP_USER_AGENT="&Request.ServerVariables("HTTP_USER_AGENT"))
Response.write ("<br>HTTP_VERSION="&Request.ServerVariables("HTTP_VERSION"))
Response.write ("<br>HTTPS="&Request.ServerVariables("HTTPS"))
Response.write ("<br>HTTPS_KEYSIZE="&Request.ServerVariables("HTTPS_KEYSIZE"))
Response.write ("<br>HTTPS_SECRETKEYSIZE="&Request.ServerVariables("HTTPS_SECRETKEYSIZE"))
Response.write ("<br>HTTPS_SERVER_ISSUER="&Request.ServerVariables("HTTPS_SERVER_ISSUER"))
Response.write ("<br>HTTPS_SERVER_SUBJECT="&Request.ServerVariables("HTTPS_SERVER_SUBJECT"))
Response.write ("<br>INSTANCE_ID="&Request.ServerVariables("INSTANCE_ID"))
Response.write ("<br>INSTANCE_META_PATH="&Request.ServerVariables("INSTANCE_META_PATH"))
Response.write ("<br>LOCAL_ADDR="&Request.ServerVariables("LOCAL_ADDR"))
Response.write ("<br>LOGON_USER="&Request.ServerVariables("LOGON_USER"))
Response.write ("<br>PATH_INFO="&Request.ServerVariables("PATH_INFO"))
Response.write ("<br>PATH_TRANSLATED="&Request.ServerVariables("PATH_TRANSLATED"))
Response.write ("<br>QUERY_STRING="&Request.ServerVariables("QUERY_STRING"))
Response.write ("<br>REMOTE_ADDR="&Request.ServerVariables("REMOTE_ADDR"))
Response.write ("<br>REMOTE_HOST="&Request.ServerVariables("REMOTE_HOST"))
Response.write ("<br>REMOTE_PORT="&Request.ServerVariables("REMOTE_PORT"))
Response.write ("<br>REMOTE_USER="&Request.ServerVariables("REMOTE_USER"))
Response.write ("<br>REQUEST_METHOD="&Request.ServerVariables("REQUEST_METHOD"))
Response.write ("<br>SCRIPT_NAME="&Request.ServerVariables("SCRIPT_NAME"))
Response.write ("<br>SCRIPT_TRANSLATED="&Request.ServerVariables("SCRIPT_TRANSLATED"))
Response.write ("<br>SERVER_NAME="&Request.ServerVariables("SERVER_NAME"))
Response.write ("<br>SERVER_PORT_SECURE="&Request.ServerVariables("SERVER_PORT_SECURE"))
Response.write ("<br>SERVER_PROTOCOL="&Request.ServerVariables("SERVER_PROTOCOL"))
Response.write ("<br>SERVER_SOFTWARE="&Request.ServerVariables("SERVER_SOFTWARE"))
Response.write ("<br>SSI_EXEC_DISABLED="&Request.ServerVariables("SSI_EXEC_DISABLED"))
Response.write ("<br>UNENCODED_URL="&Request.ServerVariables("UNENCODED_URL"))
Response.write ("<br>UNMAPPED_REMOTE_USER="&Request.ServerVariables("UNMAPPED_REMOTE_USER"))
Response.write ("<br>URL="&Request.ServerVariables("URL"))
Response.write ("<br>URL_PATH_INFO="&Request.ServerVariables("URL_PATH_INFO"))
End Sub
</script>

Screenshot

ASP.NET(vb.net) Request.ServerVariables() - Request Object

ALL_HTTP=HTTP_CONNECTION:Keep-Alive HTTP_ACCEPT:image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */* HTTP_ACCEPT_ENCODING:gzip, deflate HTTP_ACCEPT_LANGUAGE:en-US HTTP_COOKIE:CookUsername=webmaster; CookLoginPassword=33d0c2e2f252334a484dde6033d594c4; CookStatus=1; CookNewForum=N; wp-settings-1=m0%3Do%26m1%3Do%26m2%3Do%26m3%3Do%26m4%3Do%26m5%3Do%26m6%3Dc%26m7%3Do%26m8%3Do%26editor%3Dtinymce%26imgsize%3Dmedium%26hidetb%3D1%26m9%3Dc; wp-settings-time-1=1274186450; myCookie1=SiteName=www.ShotDev.Com&Creator=Mr.Weerachai Nukitram; myCookie2=Version=2009&ProjectReader=Mr.Win&NumTeam=1&StartProject=Jan 2008; ASP.NET_SessionId=j0kxaf45sqs23z3ykmz0m245 HTTP_HOST:localhost HTTP_USER_AGENT:Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; GTB6.5; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; OfficeLiveConnector.1.4; OfficeLivePatch.1.3; .NET CLR 1.1.4322; InfoPath.1)
ALL_RAW=Connection: Keep-Alive Accept: image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */* Accept-Encoding: gzip, deflate Accept-Language: en-US Cookie: CookUsername=webmaster; CookLoginPassword=33d0c2e2f252334a484dde6033d594c4; CookStatus=1; CookNewForum=N; wp-settings-1=m0%3Do%26m1%3Do%26m2%3Do%26m3%3Do%26m4%3Do%26m5%3Do%26m6%3Dc%26m7%3Do%26m8%3Do%26editor%3Dtinymce%26imgsize%3Dmedium%26hidetb%3D1%26m9%3Dc; wp-settings-time-1=1274186450; myCookie1=SiteName=www.ShotDev.Com&Creator=Mr.Weerachai Nukitram; myCookie2=Version=2009&ProjectReader=Mr.Win&NumTeam=1&StartProject=Jan 2008; ASP.NET_SessionId=j0kxaf45sqs23z3ykmz0m245 Host: localhost User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; GTB6.5; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; OfficeLiveConnector.1.4; OfficeLivePatch.1.3; .NET CLR 1.1.4322; InfoPath.1)
APP_POOL_ID=DefaultAppPool
APPL_MD_PATH=/LM/W3SVC/1/ROOT/dotnet
APPL_PHYSICAL_PATH=C:\inetpub\wwwroot\dotnet\
AUTH_PASSWORD=
AUTH_TYPE=
AUTH_USER=
CACHE_URL=http://localhost:80/dotnet/AspNetRequestServerVariables.aspx
CERT_COOKIE=
CERT_FLAGS=
CERT_ISSUER=
CERT_SECRETKEYSIZE=
CERT_SERIALNUMBER=
CERT_SERVER_ISSUER=
CERT_SERVER_SUBJECT=
CERT_SUBJECT=
CERT_KEYSIZE=HTTP_CONNECTION:Keep-Alive HTTP_ACCEPT:image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */* HTTP_ACCEPT_ENCODING:gzip, deflate HTTP_ACCEPT_LANGUAGE:en-US HTTP_COOKIE:CookUsername=webmaster; CookLoginPassword=33d0c2e2f252334a484dde6033d594c4; CookStatus=1; CookNewForum=N; wp-settings-1=m0%3Do%26m1%3Do%26m2%3Do%26m3%3Do%26m4%3Do%26m5%3Do%26m6%3Dc%26m7%3Do%26m8%3Do%26editor%3Dtinymce%26imgsize%3Dmedium%26hidetb%3D1%26m9%3Dc; wp-settings-time-1=1274186450; myCookie1=SiteName=www.ShotDev.Com&Creator=Mr.Weerachai Nukitram; myCookie2=Version=2009&ProjectReader=Mr.Win&NumTeam=1&StartProject=Jan 2008; ASP.NET_SessionId=j0kxaf45sqs23z3ykmz0m245 HTTP_HOST:localhost HTTP_USER_AGENT:Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; GTB6.5; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; OfficeLiveConnector.1.4; OfficeLivePatch.1.3; .NET CLR 1.1.4322; InfoPath.1)
CONTENT_LENGTH=0
CONTENT_TYPE=
GATEWAY_INTERFACE=CGI/1.1
HTTP_ACCEPT=image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
HTTP_ACCEPT_ENCODING=gzip, deflate
HTTP_ACCEPT_LANGUAGE=en-US
HTTP_CONNECTION=Keep-Alive
HTTP_COOKIE=CookUsername=webmaster; CookLoginPassword=33d0c2e2f252334a484dde6033d594c4; CookStatus=1; CookNewForum=N; wp-settings-1=m0%3Do%26m1%3Do%26m2%3Do%26m3%3Do%26m4%3Do%26m5%3Do%26m6%3Dc%26m7%3Do%26m8%3Do%26editor%3Dtinymce%26imgsize%3Dmedium%26hidetb%3D1%26m9%3Dc; wp-settings-time-1=1274186450; myCookie1=SiteName=www.ShotDev.Com&Creator=Mr.Weerachai Nukitram; myCookie2=Version=2009&ProjectReader=Mr.Win&NumTeam=1&StartProject=Jan 2008; ASP.NET_SessionId=j0kxaf45sqs23z3ykmz0m245
HTTP_HOST=localhost
HTTP_METHOD=GET
HTTP_REFERER=
HTTP_URL=/dotnet/AspNetRequestServerVariables.aspx
HTTP_USER_AGENT=Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; GTB6.5; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; OfficeLiveConnector.1.4; OfficeLivePatch.1.3; .NET CLR 1.1.4322; InfoPath.1)
HTTP_VERSION=HTTP/1.1
HTTPS=off
HTTPS_KEYSIZE=
HTTPS_SECRETKEYSIZE=
HTTPS_SERVER_ISSUER=
HTTPS_SERVER_SUBJECT=
INSTANCE_ID=1
INSTANCE_META_PATH=/LM/W3SVC/1
LOCAL_ADDR=::1
LOGON_USER=
PATH_INFO=/dotnet/AspNetRequestServerVariables.aspx
PATH_TRANSLATED=C:\inetpub\wwwroot\dotnet\AspNetRequestServerVariables.aspx
QUERY_STRING=
REMOTE_ADDR=::1
REMOTE_HOST=::1
REMOTE_PORT=11003
REMOTE_USER=
REQUEST_METHOD=GET
SCRIPT_NAME=/dotnet/AspNetRequestServerVariables.aspx
SCRIPT_TRANSLATED=\\?\C:\inetpub\wwwroot\dotnet\AspNetRequestServerVariables.aspx
SERVER_NAME=localhost
SERVER_PORT_SECURE=0
SERVER_PROTOCOL=HTTP/1.1
SERVER_SOFTWARE=Microsoft-IIS/7.5
SSI_EXEC_DISABLED=
UNENCODED_URL=/dotnet/AspNetRequestServerVariables.aspx
UNMAPPED_REMOTE_USER=
URL=/dotnet/AspNetRequestServerVariables.aspx
URL_PATH_INFO=

.
.
.
Download this script.
Download

1 Star2 Stars3 Stars4 Stars5 Stars6 Stars7 Stars8 Stars9 Stars10 Stars (2 votes, average: 2.00 out of 10)
Loading ... Loading ...

One Response to “ASP.NET(vb.net) Request.ServerVariables() - Request Object”

  1. 2science…

Leave a Reply

You must be logged in to post a comment.