我想获取用户在浏览器中输入的确切网址。当然,我总是可以使用类似的东西,Request.Url.ToString()但这并不能在以下情况下给我想要的东西:
http://www.mysite.com/rss
上面的网址Request.Url.ToString()会给我的是:
http://www.mysite.com/rss/Default.aspx
有谁知道如何做到这一点?
我已经尝试过:
Request.UrlRequest.RawUrlthis.Request.ServerVariables["CACHE_URL"]this.Request.ServerVariables["HTTP_URL"]((HttpWorkerRequest)((IServiceProvider)HttpContext.Current).GetService(typeof(HttpWorkerRequest))).GetServerVariable( "CACHE_URL")((HttpWorkerRequest)((IServiceProvider)HttpContext.Current).GetService(typeof(HttpWorkerRequest))).GetServerVariable( "HTTP_URL")