Skip to content

Commit

Permalink
Do not use CredentialCashe when building for uap.
Browse files Browse the repository at this point in the history
* HttpClientHandler for uap does not support a non-NetworkCredentialManager type.
* #if/#endif ...ing the piece of code that is causing this PNSE error.
* Regression was introduced via: dotnet#2668
  • Loading branch information
StephenBonikowsky committed Aug 15, 2018
1 parent fa06035 commit e0c1988
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -366,9 +366,11 @@ internal async Task<HttpClient> GetHttpClientAsync(EndpointAddress to, Uri via,
}
else
{
#if !FEATURE_NETNATIVE // HttpClientHandler for uap does not support a non-NetworkCredential type.
CredentialCache credentials = new CredentialCache();
credentials.Add(GetCredentialCacheUriPrefix(via),
AuthenticationSchemesHelper.ToString(_authenticationScheme), credential);
#endif
clientHandler.Credentials = credentials;
}

Expand Down

0 comments on commit e0c1988

Please sign in to comment.