Quantcast
Channel: ASPNETWebStack Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 7215

Created Unassigned: HttpClient is not passing impersonated authentication [1030]

$
0
0
We have a MVC 4 website using windows authentication and need to pass the logged in user's credentials to the Web API service we're calling. This works using WebClient, but we're unable to get the new HttpClient class to pass the credentials to the service.

Here's the code being used for instantiating the HttpClient.
```
var httpClient = new HttpClient(new HttpClientHandler()
{
UseDefaultCredentials = true
});
httpClient.GetStringAsync("http://localhost/some/endpoint/");
```

Disassembly of the code shows that it's checking the FlowImpersonation flag to determine if the impersonation code gets run, but we're unable to get the flag change the flag setting through aspnet_config.config. The following stackoverflow articles describe the issue in more detail.

http://stackoverflow.com/questions/12212116/how-to-get-httpclient-to-pass-credentials-along-with-the-request

http://stackoverflow.com/questions/10308938/unable-to-authenticate-to-asp-net-web-api-service-with-httpclient



Viewing all articles
Browse latest Browse all 7215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>