总结一下.net 虚拟目录获得操作最基本的操作
例如
http://localhost/killuakun/Permission/WebFromBase.aspx
想等得到全部
Request.Url.AbsoluteUri
想得到 http://localhost
Request.Url.GetLeftPart(System.UriPartial.Authority)
想得到/killuakun
Request.ApplicationPath
想得到/killuakun/Permission/WebFromBase.aspx
Request.RawUrl
Request.Url.AbsolutePath
想得到localhost
Request.Url.Authority
例如
http://localhost/killuakun/Permission/WebFromBase.aspx
想等得到全部
Request.Url.AbsoluteUri
想得到 http://localhost
Request.Url.GetLeftPart(System.UriPartial.Authority)
想得到/killuakun
Request.ApplicationPath
想得到/killuakun/Permission/WebFromBase.aspx
Request.RawUrl
Request.Url.AbsolutePath
想得到localhost
Request.Url.Authority