- , , .
- .
So, I came up with the following solution: it works on a local host with or without virtual directories and, of course, on IIS sites.
string.Format("{0}://{1}:{2}{3}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, ResolveUrl("~")
source
share