I want to write a little helper method which returns the base URL of the site. This is what I came up with:
public static string GetSiteUrl() { string ur
Based on what Warlock wrote, I found that the virtual path root is needed if you aren't hosted at the root of your web. (This works for MVC Web API controllers)
String baseUrl = Request.RequestUri.GetLeftPart(UriPartial.Authority) + Configuration.VirtualPathRoot;