loading

Base URL in ASP.Net MVC3 / Razor

If you are doing AJAX calls inside a MVC3 applications (with Razor), you will frequently need to know the base URL of the site. Especially if you are using non-standard port numbers, using Request.Url.Authority appears like a good lead at first.