天天看點

常用Request對象擷取請求資訊

Request.ServerVariables(“REMOTE_ADDR”) ‘擷取通路IP

Request.ServerVariables(“LOCAL_ADDR”) ‘同上

Request.ServerVariables(“SERVER_NAME”) ‘擷取伺服器IP

Request.ServerVariables(“HTTP_REFERER”) ‘擷取通路來源頁面

Request.ServerVariables(“OS”) ‘擷取作業系統

request.ServerVariables(“APPL_PHYSICAL_PATH”) ‘擷取IIS實體路徑

Request.ServerVariables(“SCRIPT_NAME”) ‘擷取虛拟路徑

Request.ServerVariables(“NUMBER_OF_PROCESSORS”) ‘擷取伺服器CPU個數

Request.ServerVariables(“SERVER_PORT”) ‘伺服器處理請求的端口

Request.ServerVariables["Url"] 傳回伺服器位址

Request.ServerVariables["Path_Info"] 用戶端提供的路徑資訊

Request.ServerVariables["Appl_Physical_Path"] 與應用程式中繼資料庫路徑相應的實體路徑

Request.ServerVariables["Path_Translated"] 通過由虛拟至實體的映射後得到的路徑

Request.ServerVariables["Script_Name"] 執行腳本的名稱

Request.ServerVariables["Query_String"] 查詢字元串内容

Request.ServerVariables["Http_Referer"] 請求的字元串内容

Request.ServerVariables["Server_Port"] 接受請求的伺服器端口号

Request.ServerVariables["Remote_Addr"] 送出請求的遠端主機的IP位址

Request.ServerVariables["Remote_Host"] 送出請求的遠端主機名稱

Request.ServerVariables["Local_Addr"] 傳回接受請求的伺服器位址

Request.ServerVariables["Http_Host"] 傳回伺服器位址 ​​www.2cto.com​​

Request.ServerVariables["Server_Name"] 伺服器的主機名、DNS位址或IP位址

Request.ServerVariables["Request_Method"] 提出請求的方法比如GET、HEAD、POST等等

Request.ServerVariables["Server_Port_Secure"] 如果接受請求的伺服器端口為安全端口時,則為1,否則為0

Request.ServerVariables["Server_Protocol"] 伺服器使用的協定的名稱和版本

Request.ServerVariables["Server_Software"] 應答請求并運作網關的伺服器軟體的名稱和版本

Request.ServerVariables["All_Http"] 用戶端發送的所有HTTP标頭,字首HTTP_

Request.ServerVariables["All_Raw"] 用戶端發送的所有HTTP标頭,其結果和用戶端發送時一樣,沒有字首HTTP_

Request.ServerVariables["Appl_MD_Path"] 應用程式的元​​資料庫​​路徑

Request.ServerVariables["Content_Length"] 用戶端發出内容的長度

Request.ServerVariables["Https"] 如果請求穿過安全通道(SSL),則傳回ON如果請求來自非安全通道,則傳回OFF

Request.ServerVariables["Instance_ID"] IIS執行個體的ID号

Request.ServerVariables["Instance_Meta_Path"] 響應請求的IIS執行個體的中繼資料庫路徑

Request.ServerVariables["Http_Accept_Encoding"] 傳回内容如:gzip,deflate

Request.ServerVariables["Http_Accept_Language"] 傳回内容如:en-us

Request.ServerVariables["Http_Connection"] 傳回内容:Keep-Alive

Request.ServerVariables["Http_Cookie"] 傳回内容:Cookie的值

Request.ServerVariables["Http_User_Agent"] 傳回内容:Mozilla/4.0[compatible;MSIE6.0;WindowsNT5.1;SV1]

Request.ServerVariables["Https_Keysize"] 安全套接字層連接配接關鍵字的位數,如128

Request.ServerVariables["Https_Secretkeysize"] 伺服器驗證私人關鍵字的位數如1024

Request.ServerVariables["Https_Server_Issuer"] 伺服器證書的發行者字段

Request.ServerVariables["Https_Server_Subject"] 伺服器證書的主題字段

Request.ServerVariables["Auth_Password"] 當使用基本驗證模式時,客戶在密碼對話框中輸入的密碼

Request.ServerVariables["Auth_Type"] 是使用者通路受保護的腳本時,伺服器用於檢驗使用者的驗證方法

Request.ServerVariables["Auth_User"] 代證的使用者名

Request.ServerVariables["Cert_Cookie"] 唯一的客戶證書ID号

Request.ServerVariables["Cert_Flag"]

客戶證書标志,如有用戶端證書,則bit0為0如果用戶端證書驗證無效,bit1被設定為1

Request.ServerVariables["Cert_Issuer"] 使用者證書中的發行者字段

Request.ServerVariables["Cert_Keysize"] 安全套接字層連接配接關鍵字的位數,如128

Request.ServerVariables["Cert_Secretkeysize"] 伺服器驗證私人關鍵字的位數如1024

Request.ServerVariables["Cert_Serialnumber"] 客戶證書的序列号字段

Request.ServerVariables["Cert_Server_Issuer"] 伺服器證書的發行者字段

Request.ServerVariables["Cert_Server_Subject"] 伺服器證書的主題字段

Request.ServerVariables["Cert_Subject"] 用戶端證書的主題字段

繼續閱讀