title: HttpClient.PostAsJsonAsync not working or giving any errors in debug mode
body: <p>I’m having some problems using the Web API with the MVC, not sure what is causing it but it doesn’t throw any exceptions or errors in debug mode, please could someone help to resolve this issue.</p>
  
  <p>Code is as follows:</p>
  
  <p><strong>MVC Controller calls:</strong></p>
  
  <pre><code>PortalLogonCheckParams credParams = new PortalLogonCheckParams() {SecurityLogonLogonId = model.UserName, SecurityLogonPassword = model.Password};
  
  SecurityLogon secureLogon = new SecurityLogon();
  
  var result = secureLogon.checkCredentials(credParams);
  </code></pre>
  
  <p><strong>Data Access Object method:</strong></p>
  
  <pre><code>public async Task &lt;IEnumerable&lt;PortalLogon&gt;&gt; checkCredentials(PortalLogonCheckParams credParams)
  {
      using (var client = new HttpClient())
      {
          client.BaseAddress = new Uri("http://localhost:50793/");
          client.DefaultRequestHeaders.Accept.Clear();
          client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
  
          // Check Credentials
  
          //Following call fails
  
          HttpResponseMessage response = await client.PostAsJsonAsync("api/chkPortalLogin", credParams);  
  
  
          if (response.IsSuccessStatusCode)
          {
              IEnumerable&lt;PortalLogon&gt; logonList = await response.Content.ReadAsAsync&lt;IEnumerable&lt;PortalLogon&gt;&gt;();
              return logonList;
          }
          else return null;
      }
  
  }
  </code></pre>
  
  <p><strong>Web API:</strong></p>
  
  <pre><code>[HttpPost]
  public IHttpActionResult chkPortalLogin([FromBody] PortalLogonCheckParams LogonParams)
  {
  
      List&lt;Mod_chkPortalSecurityLogon&gt; securityLogon = null;
  
      String strDBName = "";
  
      //Set the database identifier        
      strDBName = "Mod";
  
      //Retrieve the Logon object
      using (DataConnection connection = new DataConnection(strDBName))
      {
          //Retrieve the list object
          securityLogon = new Persistant_Mod_chkPortalSecurityLogon().findBy_Search(connection.Connection, LogonParams.SecurityLogonLogonId, LogonParams.SecurityLogonPassword);
      }
  
      AutoMapper.Mapper.CreateMap&lt;Mod_chkPortalSecurityLogon, PortalLogon&gt;();
  
      IEnumerable&lt;PortalLogon&gt; securityLogonNew = AutoMapper.Mapper.Map&lt;IEnumerable&lt;Mod_chkPortalSecurityLogon&gt;, IEnumerable&lt;PortalLogon&gt;&gt;(securityLogon);
  
  
      return Ok(securityLogonNew);
  
  }
  </code></pre>