我想获得用户输入浏览器的确切网址.当然我总是可以使用类似的东西,Request.Url.ToString()但在下列情况下,这并没有给我我想要的东西:
http://www.mysite.com/rss
上面的url 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")