復(fù)制代碼 代碼如下:
//Server Name
"Server Name": Server.MachineName
"Server Domain": Request.ServerVariables["Server_Name"]
"Server Port": Request.ServerVariables["Server_Port"]
"Web Server Version": Request.ServerVariables["Server_SoftWare"]//Path
"Virtual Request Path": Request.FilePath
"Physical Request Path": Request.PhysicalPath
"Virtual Application Root Path": Request.ApplicationPath
"Physical Application Root Path": Request.PhysicalApplicationPath//Platform
"Operating System Installation Directory": Environment.SystemDirectory
".Net Version": Environment.Version.ToString()
".Net Language": System.Globalization.CultureInfo.InstalledUICulture.EnglishName
"Server Current Time": DateTime.Now.ToString()
"System Uptime": TimeSpan.FromMilliseconds(Environment.TickCount).ToString()
"Script Timeout": TimeSpan.FromSeconds(Server.ScriptTimeout).ToString()
//Get Request Headers
//eg:Connection,Accept,Accept-Charset,Accept-Encoding,Accept-Language,User-Agent ...
foreach (string key in Request.Headers.AllKeys)
{
Request.Headers[key];
}
//Get Server Variables
//eg:ALL_HTTP,ALL_RAW,PATH_INFO,URL ...
foreach (string key in Request.ServerVariables.AllKeys)
{
Request.ServerVariables[key];
}
您可能感興趣的文章:- ASP.NET操作各類時間段獲取方法匯總
- ASP.NET實現(xiàn)根據(jù)IP獲取省市地址的方法
- ASP.NET使用Subtract方法獲取兩個日期之間的天數(shù)
- ASP.net中獲取客戶端參數(shù)操作系統(tǒng)信息
- asp.net獲取HTML表單File中的路徑的方法
- asp.net獲取網(wǎng)站絕對路徑示例
- asp.net獲取select值的方法
- Asp.net獲取當(dāng)前目錄的方法小結(jié)
- ASP.NET中獲取URL重寫前的原始地址詳解
- ASP.NET中實現(xiàn)獲取調(diào)用方法名