您的位置:首页 > 编程语言 > ASP

ASP.NET中关于路径的实例说明

2010-05-19 23:50 363 查看
在有虚拟目录的情况下是这样的:

HttpContext.Current.Request.ServerVariables["HTTPS"]=
HttpContext.Current.Request.ServerVariables["Server_Name"]=localhost
HttpContext.Current.Request.ServerVariables["SERVER_PORT"]=4911
HttpContext.Current.Request.ApplicationPath=/FSEWES.WEB
HttpContext.Current.Request.Pat=/FSEWES.WEB/Default3.aspx
HttpContext.Current.Request.PathInfo=
HttpContext.Current.Request.PhysicalApplicationPath=E:\application\Project\EWES\src\FSEWES.WEB\
HttpContext.Current.Request.PhysicalPath=E:\application\Project\EWES\src\FSEWES.WEB\Default3.aspx
HttpContext.Current.Request.RawUrl=/FSEWES.WEB/Default3.aspx
HttpContext.Current.Request.Url=http://localhost:4911/FSEWES.WEB/Default3.aspx

在站点下面则是这样的:HttpContext.Current.Request.ServerVariables["HTTPS"]=off
HttpContext.Current.Request.ServerVariables["Server_Name"]=localhost
HttpContext.Current.Request.ServerVariables["SERVER_PORT"]=80
HttpContext.Current.Request.ApplicationPath=/
HttpContext.Current.Request.Pat=/Default3.aspx
HttpContext.Current.Request.PathInfo=
HttpContext.Current.Request.PhysicalApplicationPath=E:\application\Project\EWES\src\FSEWES.WEB\
HttpContext.Current.Request.PhysicalPath=E:\application\Project\EWES\src\FSEWES.WEB\Default3.aspx
HttpContext.Current.Request.RawUrl=/Default3.aspx
HttpContext.Current.Request.Url=http://localhost:4911/Default3.aspx
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: