常用的
//HttpContext.Current.Request.ApplicationPath; 只返回虚拟目录 /bsdqpqx,如果是网站 /
//
Request.ServerVariables[
"
Path_Info
"
] 完整的客户端请求地址
//
Request.ServerVariables[
"
Http_Host
"
] 返回服务器地址 ,不含虚拟目录,不含端口 localhost
//
Request.ServerVariables[
"
Server_Name
"
] 同http_host
//
ResolveUrl("../") 当前文件所在目录的上级目录,对应的虚拟目录:如果是网站返回/,如果虚拟目录返回 /bsdqpqx/
//Request.ServerVariables[
"
SERVER_PORT
"
]
'
服务器处理请求的端口
Request.ServerVariables[ " LOCAL_ADDR " ]
Request.ServerVariables[ " SERVER_NAME " ]
Request.ServerVariables[ " HTTP_REFERER