An error occurred while receiving the HTTP response to http://. This could be due to the service endpoint binding not using the HTTP protocol RRS feed

  • Question

  • Hi,

    I am getting the below error while consume the wcf service. Just i am using SharePoint Server Object Model in wcf service. I could consume the service successfullyy but getting this error while execute the service method .

    An error occurred while receiving the HTTP response to This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details.

    Please See My Web config:

    <?xml version="1.0" encoding="utf-8" ?>
            <behavior name="Test.Service1ServiceBehavior">
              <serviceMetadata httpGetEnabled="true" />
              <serviceDebug includeExceptionDetailInFaults="false" />
          <service behaviorConfiguration="Test.Service1ServiceBehavior"
            <endpoint address="" binding="basicHttpBinding" contract="TestWcfService.IService1">
                <dns value="localhost" />
            <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />

    Thanks & Regards

    Poomani Sankaran

    Saturday, May 31, 2014 5:02 AM


  • Hi,

    I see that your service name is Test.Service1 and your service contract name is TestWcfService.IService1. Then if I do not misunderstand you, then the namespace of the service and service contract are mismatch. Please try to check it.

    Also please try to set the following to get more error information.

    <serviceDebug includeExceptionDetailInFaults="true" />

    Besides, enabling the wcf trace can also help you to find the root cause.
    The following configuration taken from MSDN can be applied to enable tracing on your WCF service.

          <source name="System.ServiceModel"
                  switchValue="Information, ActivityTracing"
                  propagateActivity="true" >
                 <add name="xml"/>
          <source name="System.ServiceModel.MessageLogging">
                <add name="xml"/>
          <source name="myUserTraceSource"
                  switchValue="Information, ActivityTracing">
                <add name="xml"/>
            <add name="xml"
                 initializeData="Error.svclog" />

    Best Regards,
    Amy Peng

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, June 2, 2014 2:51 AM