locked
WCF Web Service Doesn't Work on Deployed Server RRS feed

  • Question

  • Using VS2008/.Net 3.5 SP1...

    We have a WCF web service. When we run our client app in the IDE, the service and client interact just fine.

    When we deploy the web service, we can browse to it successfully in a web browser, but our client app either times out, or generates this exception:

    "An error occurred while receiving the HTTP response to http://webserver/MyService/MyBusinessService.svc/username. 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."

    I'm really at a loss here.

    Tuesday, September 8, 2009 5:58 PM

Answers

  • Is there a proxy on the network? You might need to configure the proxy settings manually.

    Post your web.config too.


    Nordine Ben Bachir
    Thursday, September 10, 2009 12:23 PM
  • Hi John,

    I agree to Nordine's suggestion that you can check the proxy setting to see whether there is a proxy server required for your client machine to connect to the deployed server(which host WCF service). When you use IE to visit the service page, it may use the IE proxy setting while the WCF client code may not use the default proxy setting.

    You can try manually specifying a proxy for test in your client code(which call the wcf service). i.e.

    WebRequest.DefaultWebProxy = new WebProxy(....)
    .....

    //call the wcf service here

    For more about proxy setting/detecting in .NET application, here is a good article:

    Take the Burden Off Users with Automatic Configuration in .NET
    http://msdn.microsoft.com/en-us/magazine/cc300743.aspx
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Tuesday, September 15, 2009 5:19 AM

All replies

  • Hi John,

    you should turn on the WCF tracing mechanism, that way you should get a clue what's wrong with your service.

    Regards,
    Stipe-Ivan
    Tuesday, September 8, 2009 7:51 PM
  • Hi John ,

    Here are 2 previous thread in this kind of issue :

    An error occurred while receiving the HTTP response to xxx problem. WCF comunication
    http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/686499d2-5e31-47ee-941b-760264472875

    "Error receiving HTTP response" in WCF client application
    http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/49749cea-81ca-4ea2-b693-a6e812822855

    Please check if the workarounds also work for you.

    If not , please post enable the WCF tracing and post the log here , we will help you to figure out the root cause to this issue.

    Thanks , Quan


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Thursday, September 10, 2009 10:33 AM
  • Is there a proxy on the network? You might need to configure the proxy settings manually.

    Post your web.config too.


    Nordine Ben Bachir
    Thursday, September 10, 2009 12:23 PM
  • Hi John,

    I agree to Nordine's suggestion that you can check the proxy setting to see whether there is a proxy server required for your client machine to connect to the deployed server(which host WCF service). When you use IE to visit the service page, it may use the IE proxy setting while the WCF client code may not use the default proxy setting.

    You can try manually specifying a proxy for test in your client code(which call the wcf service). i.e.

    WebRequest.DefaultWebProxy = new WebProxy(....)
    .....

    //call the wcf service here

    For more about proxy setting/detecting in .NET application, here is a good article:

    Take the Burden Off Users with Automatic Configuration in .NET
    http://msdn.microsoft.com/en-us/magazine/cc300743.aspx
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Tuesday, September 15, 2009 5:19 AM