I have got an MVC 5 web application hosted on IIS8 which is secured with Windows Authentication. The application has an WebApi2 controller which I am calling server side from itself via an MVC controller, however I keep getting a 401 Unauthorized when making the call (POST verb).
var client = new HttpClient();
var response = client.PostAsJsonAsync(url, dto).Result;
Things I have tried with no success:
- Setting the application pool user identity to a custom account 
- Enabling ASP.NET impersonation with account credentials 
- Editing the registry to whitelist the domain (as per this solution Unable to get windows authentication to work through local IIS) 
Wondering if anyone else has any suggestions/seen this issue before?
