title: Send request to WebAPI as service account
body: <p>I have two applications.</p>
  
  <ul>
  <li>Both on the same server</li>
  <li>Both running as the same service account</li>
  <li>Both require windows Auth</li>
  </ul>
  
  <p>I'm trying to use HttpClient to get from one app to the other with a simple post request; however, the identity doesn't seem to get used.</p>
  
  <p>What I'm using looks like this:</p>
  
  <pre><code>var testIdentity = System.Security.Principal.WindowsIdentity.GetCurrent();
  var handler = new HttpClientHandler()
  {
      UseDefaultCredentials = true
  };
  
  using (var client = new HttpClient(handler))
  { 
      //...
      HttpResponseMessage respose = client.PostAsJsonAsync("api/controller/Method", request);
      response.EnsureSuccessStatusCode(); // Exception here!
      //...
  }
  </code></pre>
  
  <p>I've verified <code>testIdentity</code> is the service account I want to be running as, but it doesn't seem to make it. I always get a 401 response back.</p>
  
  <p>I've also tested the application sending the request locally (but same domain), and the WebAPI on the server, but that doesn't work either (same 401 response).</p>
  
  <p>If I have both applications local then it works as expected.</p>
  
  <p>Any idea what I may be missing?</p>