"The request failed with an empty response" when calling a web service "The request failed with an empty response" when calling a web service asp.net asp.net

"The request failed with an empty response" when calling a web service


I know this is an old question, but we had the same exception happening in one of our integration environments:

System.Net.WebException: The request failed with an empty response

The issue was that when we upgraded the server hardware, we also switched all of our endpoints to be using HTTPS. The code that was calling the endpoints was not upgraded, so it was still using regular HTTP. Apparently this is the exception you get when you try to call an HTTPS service as HTTP. Hope this helps someone down the line.


I would like to add to what Andacious stated. I was making a call to a web-service which was https but when I looked at the properties of the object making the call it actually was using http. So I specifically set the URL property.

I have a class called interchange which inherits from SoapHttpClientProtocol.

interchangeWS = new InterchangeWS();interchangeWS.Url = "https://somesite/interchange.asmx";string x = interchangeWS.SomeMethod("someParameter");


Sometimes it happens when pointing to an endpoint which is under LoadBalancer, what's happens is once you add the reference to the project (in VisualStudio) using HTTPS, then check the app.config file under the child and see if the endpoint URL is set to HTTP, then update it manually to HTTPS and you should be good.Hope it helps.