在有虚拟目录的情况下是这样的:

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

相关文章:

  • 2021-12-09
  • 2022-12-23
  • 2021-09-10
  • 2021-12-14
  • 2021-11-18
  • 2021-11-28
  • 2022-01-14
  • 2021-08-24
猜你喜欢
  • 2022-12-23
  • 2022-01-08
  • 2021-08-06
  • 2021-06-07
  • 2022-01-19
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案