To make it simpler for a webapp to share files with another app on a different server, I\'m using a base href tag in my master page. As many people have discovered, this breaks
// Gets the base url in the following format:
// "http(s)://domain(:port)/AppPath"
HttpContext.Current.Request.Url.Scheme
+ "://"
+ HttpContext.Current.Request.Url.Authority
+ HttpContext.Current.Request.ApplicationPath;