HttpClient client = new HttpClient();
client.BaseAddress = new Uri("http://localhost:60792");
Instead of localhost:60792 how do I find it dynamically on start up? Pointing me in the right direction would suffice. But if you have an answer let me know.
Update thanks for the hint. My final answer is
String baseURL = string.Format(
(
System.Web.HttpContext.Current.Request.Url.Port != 80) ? "{0}://{1}:{2}" : "{0}://{1}",
System.Web.HttpContext.Current.Request.Url.Scheme,
System.Web.HttpContext.Current.Request.Url.Host,
System.Web.HttpContext.Current.Request.Url.Port
);
string url = HttpContext.Current.Request.Url.AbsoluteUri;