none
Windows 8 app development. An error occurred while receiving the HTTP response from WCF RRS feed

  • Question

  • Whats wrong with this:

    MyServiceReference.ServiceClient client = new MyServiceReference.ServiceClient();
    MyServiceReference.User temp = await client.VerifyUser(user_email.Text);

    It gives me the following Exception at line 2:

    "An error occurred while receiving the HTTP response to {Service Url}. 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".

    Wednesday, January 22, 2014 3:44 PM

Answers

  • Hi,

    >>"An error occurred while receiving the HTTP response to {Service Url}. 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".

    First please try to add the following to see if it helps:

     <system.web>
         <httpRuntime maxRequestLength="2147483647" executionTimeout="103600"/>
     </system.web>

    For more information, please try to refer to:
    http://realtimescenarios.blogspot.in/2013/05/wcf-communicationexception-this-could.html .

    http://social.msdn.microsoft.com/Forums/vstudio/en-US/0beeb627-b35a-4640-87fd-e0e6c8d48f15/maximum-request-length-exceeded?forum=wcf .

    Then if it can not solve the problem, please try to enable the wcf tracing to find the cause.
    The following configuration taken from MSDN can be applied to enable tracing on your WCF service.

    <configuration>
      <system.diagnostics>
        <sources>
          <source name="System.ServiceModel"
                  switchValue="Information, ActivityTracing"
                  propagateActivity="true" >
            <listeners>
                 <add name="xml"/>
            </listeners>
          </source>
          <source name="System.ServiceModel.MessageLogging">
            <listeners>
                <add name="xml"/>
            </listeners>
          </source>
          <source name="myUserTraceSource"
                  switchValue="Information, ActivityTracing">
            <listeners>
                <add name="xml"/>
            </listeners>
          </source>
        </sources>
        <sharedListeners>
            <add name="xml"
                 type="System.Diagnostics.XmlWriterTraceListener"
                 initializeData="Error.svclog" />
        </sharedListeners>
      </system.diagnostics>
    </configuration>

    Also it will be better if you can post your config file here.

    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.

    Thursday, January 23, 2014 3:32 AM
    Moderator