Using HttpClient with ASMX in C#
问题 I am playing with HttpClient'. I'm wondering if it is compatible with .asmx` web services. Say I have a method such as this: var baseAddress = new Uri("Http://localhost/folder/WebServiceCommand.asmx/"); var config = new HttpSelfHostConfiguration(baseAddress); var server = new HttpSelfHostServer(config); using (var client = new HttpClient(server)) { client.BaseAddress = baseAddress; var response = client.GetAsync("GetData").Result; Assert.IsTrue( response.IsSuccessStatusCode, "Actual status