How can I use Windows Authentication with Microsoft.Rest.ServiceClient
问题 I have a Microsoft.Rest.ServiceClient generated with autorest . And I want to access a REST API secured with Windows Authentication and Basic Authentication. The goal is to use Windows Authentication. I tried it as follows: var handler = new HttpClientHandler { UseDefaultCredentials = true, }; this.InitializeHttpClient(handler); This does not work, I get: System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The remote server returned