title: HttpClient.PostAsync no response & no exceptions
body: <pre><code>public async static Task&lt;string&gt; GetResponse(string host, string request, HttpClient client)
  {
      HttpContent content = new StringContent(request, Encoding.UTF8, &quot;application/xml&quot;);
      HttpResponseMessage message = await client.PostAsync(host, content).ConfigureAwait(false);  // issue here
      string response = await message.Content.ReadAsStringAsync().ConfigureAwait(false);
      return response;
  }
  </code></pre>
  <p>The calling code within the same namespace -</p>
  <pre><code>public async Task&lt;string&gt; Post(Transaction transaction)
  {
      string postXml = PostXml.Create(transaction); // serializes object to XML
      string response = await GetResponse(host, postXml, client); // client initialized in constructor of this class
      return await Deserialize.Response(response);
  }
  </code></pre>
  <p><strong>The above methods run as expected when calling them directly from Unit Tests.</strong></p>
  <p>I have an interface to take advantage of dynamic loading of different services - which calls the <code>Task&lt;string&gt; Post(Transaction transaction)</code> method. When calling this method from my main project - the relevant service is loaded (depending on settings), but I get no response from <code>client.PostAsync(host, content)</code>.</p>
  <p>No exception or errors. I have tried to debug the issue with breakpoints but got nothing. It hits the <code>PostAsync</code> and continuing just escapes the rest of the code.</p>
  <p>Note 1: everything is async all the way through and there is no thread blocking code such as <code>.Wait()</code> or <code>.Result</code> anywhere</p>
  <p>Note 2: i have tried running it by removing the ConfigureAwait as well. In both cases, the unit tests run perfectly. Somehow it doesnt work when i reference this project in my main project. I still dont understand, cause I still reach that part of the code. Beyond which, the program still runs without blocking the UI thread but there is no response.</p>
  <hr />
  <hr />
  <p><strong>UPDATE</strong></p>
  <p>To get the <code>host</code>, I was reading a configuration json file. Reading this file caused the issue I am facing, when I hardcode the host to a variable, everything works fine. Initially the reading of this file was Asynchronous, but to debug the issue I changed it to synchronized reading - this still did not resolve the issue.</p>
  <blockquote>
  <p>NOTE - Using the App.Config works well.</p>
  </blockquote>
  <p>I am using newtonsoft to read a custom json settings file. I am not a big fan of reading configuration from the app.config due to its XML structure and complex way of accessing custom section.</p>
  <pre><code>public static ServerConfig GetServerSettings()
  {
      string json = File.ReadAllText(&quot;appSettings.json&quot;);
      return JsonConvert.DeserializeObject&lt;ServerConfig&gt;(json);
  }
  </code></pre>
  <p>ServerConfig has properties namely the <code>string host</code> and <code>string company</code> (i.e. which company's data) I want to access.</p>