Getting the actual URL, with domain and not host name from my ASP.NET 2.0 application.
I am trying to open in IE a file (MS Word Doc) that I just uploaded through my web application on an IIS server running ASP.NET 2.0. I am able to get a URL from the Request.Url object and this works when I am debugging locally. However, when the application gets published to an application web server the Request.Url.AbsoluteUri returns the host name in the Url which is not accessible to a remote/browsing computer.
For example, this works on my local:
This does not work when the application runs from the server:
I am able to navigate with my browser to the file and open it on the web server with a URL like:
This may be an ignorant question, but I guess that's me right now, Should I be asking for "how to get the domain?" ?