抄来的,记录下:
例如
http://localhost/root/sub/abc.aspx
想等得到全部
Request.Url.AbsoluteUri
Request.Url.GetLeftPart(System.UriPartial.Authority)
想得到/root
Request.ApplicationPath
想得到/root/sub/abc.aspx
Request.RawUrl
Request.Url.AbsolutePath
想得到localhost
Request.Url.Authority
在web.config中添加这样一句:
<httpRuntime maxRequestLength="限制文件大小的值" executionTimeout="时间"/>