Q: Find the URL of the current web application In an ASP.NET Application running from within an IIS. What is the correct way to find the URL of my application. I mean the IIS configuration, ignoring proxies, redirection and URL rewriting.
Thank you

I would really prefer it not to be dependent on a request...

A: try this : 
Request.ServerVariables[ "HTTP_URL" ]


A: Here's how it should work:
string app = HttpContext.Current.Request.PhysicalApplicationPath;


A: what do you mean "URL of my application"?
to get the physical app path:  string path= HttpContext.Current.Request.ApplicationPath;
or try this if this is what you want: string path =  System.AppDomain.CurrentDomain.BaseDirectory;

A: string app = HttpContext.Current.Request.ApplicationPath;

That should do the trick.

A: Try this other option:
Uri uri = HttpContext.Current.Request.Url;
string strCompleteUrl = uri.Scheme + Uri.SchemeDelimiter + uri.Host + ":" + uri.Port + uri.AbsolutePath;

