title: UWP: Contacting REST API with Windows Integraged Authentication works on developer machine but not on other machines
body: <p>I am working on a UWP application which will be run on Windows 10 laptops and tablets.  The environment it will deployed in requires that all users log into their systems with a smart card (so no username/password).  I am using HttpClient to connect to a REST API which is configured for Windows Integrated authentication.  When I run on my development machine, either in VS or using the Release Build output I can connect to the API with no issues.  However when that Release Build output is installed on a different (non-developer) machine it is unable to connect to the server.  The IIS server returns an error with the message: "401 - Unauthorized: Access is denied due to invalid credentials. and the following entry appears in the IIS log:</p>
  
  <p>"2019-07-03 15:49:57  X.X.X.X GET /api/ - 80 - Y.Y.Y.Y - - myserver.com 401 2 5 31"</p>
  
  <p>My IIS server is configured to allow ASP.Net Impersonation and Windows Authentication but no other authentication methods.</p>
  
  <p>The relevant code snippet is:</p>
  
  <pre><code>using (HttpClient client =
      new HttpClient(new HttpClientHandler()
      {
          PreAuthenticate = true,
          UseDefaultCredentials = true,
          Credentials = CredentialCache.DefaultNetworkCredentials
      }))
  {
      client.BaseAddress = new Uri(RequestUri);
      client.DefaultRequestHeaders
          .Accept
          .Add(new MediaTypeWithQualityHeaderValue("application/json"));
  
      HttpResponseMessage response = null;
  
      try
      {
          response = await client.GetAsync(RequestUri);
  
      }
  </code></pre>
  
  <p>....</p>
  
  <p>Can anyone suggest what I am doing incorrectly in my request configuration?</p>
  
  <p>TIA</p>
  
  <p>Ron L</p>