Request.ServerVariables("REMOTE_ADDR") '獲取訪問IP
Request.ServerVariables("LOCAL_ADDR") '同上
Request.ServerVariables("SERVER_NAME") '獲取服務(wù)器IP
Request.ServerVariables("HTTP_REFERER") '獲取訪問來源頁面
Request.ServerVariables("OS") '獲取操作系統(tǒng)
request.ServerVariables("APPL_PHYSICAL_PATH") '獲取IIS物理路徑
Request.ServerVariables("SCRIPT_NAME") '獲取虛擬路徑
Request.ServerVariables("NUMBER_OF_PROCESSORS") '獲取服務(wù)器CPU個(gè)數(shù)
Request.ServerVariables("SERVER_PORT") '服務(wù)器處理請求的端口
Request.ServerVariables["Url"] 返回服務(wù)器地址
Request.ServerVariables["Path_Info"] 客戶端提供的路徑信息
Request.ServerVariables["Appl_Physical_Path"] 與應(yīng)用程序元數(shù)據(jù)庫路徑相應(yīng)的物理路徑
Request.ServerVariables["Path_Translated"] 通過由虛擬至物理的映射后得到的路徑
Request.ServerVariables["Script_Name"] 執(zhí)行腳本的名稱
Request.ServerVariables["Query_String"] 查詢字符串內(nèi)容
Request.ServerVariables["Http_Referer"] 請求的字符串內(nèi)容
Request.ServerVariables["Server_Port"] 接受請求的服務(wù)器端口號
Request.ServerVariables["Remote_Addr"] 發(fā)出請求的遠(yuǎn)程主機(jī)的IP地址
Request.ServerVariables["Remote_Host"] 發(fā)出請求的遠(yuǎn)程主機(jī)名稱
Request.ServerVariables["Local_Addr"] 返回接受請求的服務(wù)器地址
Request.ServerVariables["Http_Host"] 返回服務(wù)器地址
Request.ServerVariables["Server_Name"] 服務(wù)器的主機(jī)名、DNS地址或IP地址
Request.ServerVariables["Request_Method"] 提出請求的方法比如GET、HEAD、POST等等
Request.ServerVariables["Server_Port_Secure"] 如果接受請求的服務(wù)器端口為安全端口時(shí),則為1,否則為0
Request.ServerVariables["Server_Protocol"] 服務(wù)器使用的協(xié)議的名稱和版本
Request.ServerVariables["Server_Software"] 應(yīng)答請求并運(yùn)行網(wǎng)關(guān)的服務(wù)器軟件的名稱和版本
Request.ServerVariables["All_Http"] 客戶端發(fā)送的所有HTTP標(biāo)頭,前綴HTTP_
Request.ServerVariables["All_Raw"] 客戶端發(fā)送的所有HTTP標(biāo)頭,其結(jié)果和客戶端發(fā)送時(shí)一樣,沒有前綴HTTP_
Request.ServerVariables["Appl_MD_Path"] 應(yīng)用程序的元數(shù)據(jù)庫路徑
Request.ServerVariables["Content_Length"] 客戶端發(fā)出內(nèi)容的長度
Request.ServerVariables["Https"] 如果請求穿過安全通道(SSL),則返回ON如果請求來自非安全通道,則返回OFF
Request.ServerVariables["Instance_ID"] IIS實(shí)例的ID號
Request.ServerVariables["Instance_Meta_Path"] 響應(yīng)請求的IIS實(shí)例的元數(shù)據(jù)庫路徑
Request.ServerVariables["Http_Accept_Encoding"] 返回內(nèi)容如:gzip,deflate
Request.ServerVariables["Http_Accept_Language"] 返回內(nèi)容如:en-us
Request.ServerVariables["Http_Connection"] 返回內(nèi)容:Keep-Alive
Request.ServerVariables["Http_Cookie"] 返回內(nèi)容:Cookie的值
Request.ServerVariables["Http_User_Agent"] 返回內(nèi)容:Mozilla/4.0[compatible;MSIE6.0;WindowsNT5.1;SV1]
Request.ServerVariables["Https_Keysize"] 安全套接字層連接關(guān)鍵字的位數(shù),如128
Request.ServerVariables["Https_Secretkeysize"] 服務(wù)器驗(yàn)證私人關(guān)鍵字的位數(shù)如1024
Request.ServerVariables["Https_Server_Issuer"] 服務(wù)器證書的發(fā)行者字段
Request.ServerVariables["Https_Server_Subject"] 服務(wù)器證書的主題字段
Request.ServerVariables["Auth_Password"] 當(dāng)使用基本驗(yàn)證模式時(shí),客戶在密碼對話框中輸入的密碼
Request.ServerVariables["Auth_Type"] 是用戶訪問受保護(hù)的腳本時(shí),服務(wù)器用於檢驗(yàn)用戶的驗(yàn)證方法
Request.ServerVariables["Auth_User"] 代證的用戶名
Request.ServerVariables["Cert_Cookie"] 唯一的客戶證書ID號
Request.ServerVariables["Cert_Flag"]
客戶證書標(biāo)志,如有客戶端證書,則bit0為0如果客戶端證書驗(yàn)證無效,bit1被設(shè)置為1
Request.ServerVariables["Cert_Issuer"] 用戶證書中的發(fā)行者字段
Request.ServerVariables["Cert_Keysize"] 安全套接字層連接關(guān)鍵字的位數(shù),如128
Request.ServerVariables["Cert_Secretkeysize"] 服務(wù)器驗(yàn)證私人關(guān)鍵字的位數(shù)如1024
Request.ServerVariables["Cert_Serialnumber"] 客戶證書的序列號字段
Request.ServerVariables["Cert_Server_Issuer"] 服務(wù)器證書的發(fā)行者字段
Request.ServerVariables["Cert_Server_Subject"] 服務(wù)器證書的主題字段
Request.ServerVariables["Cert_Subject"] 客戶端證書的主題字段
Request.ServerVariables["Content_Type"] 客戶發(fā)送的form內(nèi)容或HTTPPUT的數(shù)據(jù)類型
.NET常用Request獲取信息總結(jié)
2019-10-27 11:17asp.net教程網(wǎng) ASP.NET教程
.NET常用Request獲取信息總結(jié),需要的朋友可以參考一下
延伸 · 閱讀
- 2022-03-08Flask request 對象介紹
- 2022-03-01SpringBoot v2.2以上重復(fù)讀取Request Body內(nèi)容的解決方
- 2022-03-01攔截器獲取request的值之后,Controller拿不到值的解
- 2022-03-01在攔截器中讀取request參數(shù),解決在controller中無法
- 2022-02-28解決偶現(xiàn)的MissingServletRequestParameterException異常問
- 2022-02-27.NET Core開發(fā)之配置詳解
- ASP.NET教程
微信小程序如何使用原生Websocket與Asp.Net Core SignalR 通信
背景 如題,這可能算是.net 做小程序的服務(wù)端時(shí),繞不開的一個(gè)問題,老生常談了。同樣的問題,我記得我2018/19年的一個(gè)項(xiàng)目的解決方案是: 修改官方的...
- ASP.NET教程
詳解ASP.NET 生成二維碼實(shí)例(采用ThoughtWorks.QRCode和QrCode.Net兩種方
本篇文章主要介紹了ASP.NET 生成二維碼實(shí)例,使用了兩種方法,包括ThoughtWorks.QRCode和QrCode.Net,具有一定的參考價(jià)值,有興趣的可以了解一下。 ...
- ASP.NET教程
ASP.NET OutputCache詳解
這篇文章主要介紹了ASP.NET OutputCache詳解,本文詳細(xì)講解了OutputCache的語法、OutputCache的參數(shù)、OutputCache使用示例等內(nèi)容,需要的朋友可以參考下 ...
- ASP.NET教程
asp.net中的窗體身份驗(yàn)證(最簡單篇)
這篇文章主要介紹了最簡單的asp.net中的窗體身份驗(yàn)證,詳細(xì)敘述了asp.net的窗體身份驗(yàn)證步驟,感興趣的小伙伴們可以參考一下 ...
- ASP.NET教程
.Net MVC實(shí)現(xiàn)長輪詢
這篇文章主要為大家詳細(xì)介紹了.Net MVC實(shí)現(xiàn)長輪詢的相關(guān)資料,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下 ...
- ASP.NET教程
asp.net gridview分頁:第一頁 下一頁 1 2 3 4 上一頁 最末頁
這篇文章主要介紹了asp.net gridview分頁:第一頁 下一頁 1 2 3 4 上一頁 最末頁,可使用上下鍵選中行,選中后點(diǎn)擊修改,textbox獲得gridview中的代碼的數(shù)據(jù),需要...
- ASP.NET教程
GridView分頁的實(shí)現(xiàn)(通用分頁模板)
要在GridView中加入AllowPaging=true,一頁數(shù)據(jù)多少行PageSize=10分頁時(shí)觸發(fā)的事件OnPageIndexChanging等等,感興趣的朋友可以了解下本文,希望對你有所幫助 ...
- ASP.NET教程
asp .net實(shí)現(xiàn)給圖片添加圖片水印方法示例
圖片上加水印相信每位程序員都會遇到這個(gè)需求,下面這篇文章主要給大家介紹了asp .net實(shí)現(xiàn)給圖片添加圖片水印的方法,文中給出了完整的實(shí)例代碼,相...