Development:dotNET:ServerVariables

From Main

HttpRequest.ServerVariables

Below is a list of all server variables returned from a standard Visual Studio 2005 web page session.

Here is the code that generated it
        Dim loop1, loop2 As Integer
        Dim arr1(), arr2() As String
        Dim coll As NameValueCollection

        ' Load ServerVariable collection into NameValueCollection object.
        coll = Request.ServerVariables
        ' Get names of all keys into a string array.
        arr1 = coll.AllKeys
        For loop1 = 0 To arr1.GetUpperBound(0)
            Response.Write("Key: " & arr1(loop1) & vbCrLf)
            arr2 = coll.GetValues(loop1) ' Get all values under this key.
            For loop2 = 0 To arr2.GetUpperBound(0)
                Response.Write("Value " & CStr(loop2) & ": " & Server.HtmlEncode(arr2(loop2)) & vbCrLf)
            Next loop2
        Next loop1

==The Variables==
Key: ALL_HTTP
Value 0: HTTP_CONNECTION:Keep-Alive
HTTP_ACCEPT:image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, */*
HTTP_ACCEPT_ENCODING:gzip, deflate
HTTP_ACCEPT_LANGUAGE:en-us
HTTP_HOST:localhost:1456
HTTP_USER_AGENT:Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)

Key: ALL_RAW
Value 0: Connection: Keep-Alive
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, */*
Accept-Encoding: gzip, deflate
Accept-Language: en-us
Host: localhost:1456
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)

Key: APPL_MD_PATH
Value 0: 
Key: APPL_PHYSICAL_PATH
Value 0: C:\Documents and Settings\vmuser\My Documents\Visual Studio 2005\WebSites\MyApplication\
Key: AUTH_TYPE
Value 0: NTLM
Key: AUTH_USER
Value 0: VMXPVS05\vmuser
Key: AUTH_PASSWORD
Value 0: 
Key: LOGON_USER
Value 0: VMXPVS05\vmuser
Key: REMOTE_USER
Value 0: VMXPVS05\vmuser
Key: CERT_COOKIE
Value 0: 
Key: CERT_FLAGS
Value 0: 
Key: CERT_ISSUER
Value 0: 
Key: CERT_KEYSIZE
Value 0: 
Key: CERT_SECRETKEYSIZE
Value 0: 
Key: CERT_SERIALNUMBER
Value 0: 
Key: CERT_SERVER_ISSUER
Value 0: 
Key: CERT_SERVER_SUBJECT
Value 0: 
Key: CERT_SUBJECT
Value 0: 
Key: CONTENT_LENGTH
Value 0: 0
Key: CONTENT_TYPE
Value 0: 
Key: GATEWAY_INTERFACE
Value 0: 
Key: HTTPS
Value 0: 
Key: HTTPS_KEYSIZE
Value 0: 
Key: HTTPS_SECRETKEYSIZE
Value 0: 
Key: HTTPS_SERVER_ISSUER
Value 0: 
Key: HTTPS_SERVER_SUBJECT
Value 0: 
Key: INSTANCE_ID
Value 0: 
Key: INSTANCE_META_PATH
Value 0: 
Key: LOCAL_ADDR
Value 0: 127.0.0.1
Key: PATH_INFO
Value 0: /MyApplication/main.aspx
Key: PATH_TRANSLATED
Value 0: C:\Documents and Settings\vmuser\My Documents\Visual Studio 2005\WebSites\MyApplication\main.aspx
Key: QUERY_STRING
Value 0: 
Key: REMOTE_ADDR
Value 0: 127.0.0.1
Key: REMOTE_HOST
Value 0: 127.0.0.1
Key: REMOTE_PORT
Value 0: 
Key: REQUEST_METHOD
Value 0: GET
Key: SCRIPT_NAME
Value 0: /MyApplication/main.aspx
Key: SERVER_NAME
Value 0: localhost
Key: SERVER_PORT
Value 0: 1456
Key: SERVER_PORT_SECURE
Value 0: 0
Key: SERVER_PROTOCOL
Value 0: HTTP/1.1
Key: SERVER_SOFTWARE
Value 0: 
Key: URL
Value 0: /MyApplication/main.aspx
Key: HTTP_CONNECTION
Value 0: Keep-Alive
Key: HTTP_ACCEPT
Value 0: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, */*
Key: HTTP_ACCEPT_ENCODING
Value 0: gzip, deflate
Key: HTTP_ACCEPT_LANGUAGE
Value 0: en-us
Key: HTTP_HOST
Value 0: localhost:1456
Key: HTTP_USER_AGENT
Value 0: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)