title: MVC 4 API API not loading when called by a program
body: <p>I've created a MVC4 Web API application. When I connect to it in a web browser it works fine. It also works fine when my service connects, as long as I connect to it via a web browser first.  However, if I don't connect to it via a web browser, but simply have the service try to connect, the connection is timing out.</p>
  
  <p>Any idea why it is not loading?</p>
  
  <p>I am using .Net 4.5 in both applications.</p>
  
  <p>My connection code looks like this:</p>
  
  <pre><code>var client = new HttpClient { BaseAddress = new Uri(url) };
  
  client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); 
  
  var response = Client.GetAsync("version/current").Result;
  </code></pre>
  
  <p>This last line is where I get the <code>TaskCanceledException</code> (after about 4 minutes).  Again, once the site is loaded up, this call works fine.</p>