title: Call a remote WEB API
body: <p>Good evening, 
  I am new in c# and asp.net
  I have created an MVC 4 WEB Application and I am using aspx as the view.
  I am trying to call a remote web API and unfortunately I do not get it, in order to display the data on my web site.
  I created one controller and inside the controller in the Index() method I wrote this code:</p>
  
  <pre><code>public class CallAPIController : Controller
  {
      //
      // GET: /CallAPI/
  
     public async Task&lt;string&gt; Index()
      {
  
          HttpClient client = new HttpClient();
          client.BaseAddress = new Uri("http://remoteWEBAPI/");
  
          // Add an Accept header for JSON format.
          client.DefaultRequestHeaders.Accept.Add(
              new MediaTypeWithQualityHeaderValue("application/json"));
  
          HttpResponseMessage response = client.GetAsync("api/data").Result;  // Blocking call!
         string json = await response.Content.ReadAsStringAsync();
  
              Debug.WriteLine("Content: " + json);
              return json;
  
      }
  
  }
  </code></pre>
  
  <p>I am new to this technologies, I have tried many things and I have been struggling with this for the last 4-5 hours.I do not know how to solve this problem. Could you please help me? I do not think it should be very difficult for someone expert familiar with these...</p>