none
Cannot Execute WCF Query RRS feed

  • Question

  • I have a very strange issue that I cannot figure out.

    My application uses OData to read data from a WCF service. This has worked without issue until recently. These queries now only work from my application if the WFC service is on my local machine. If it is running on another server, it times out.

    Here is where it gets strange. If I capture traffic with Fiddler, it runs without issue. Simply by using Fiddler as a proxy, I can perform queries.

    If I do the same query from LINQPad, it runs without issue. The queries only fail when running from my application to a WCF service on the network.

    I have tried all combinations of firewall rules, opening all ports for the application as well as opening the specific port I need.

    I am out of ideas, so willing to try anything at this point!

    Monday, June 3, 2013 10:29 PM

Answers

  • Mystery solved.

    I have a general function to test connectivity to our server before trying to access data from the server. I thought it would be slick and attach it to the SendingRequest event handler of the data context. However I forgot to dispose of this "HasConnectivity" request, so I think my "HasConnectivity" WebRequest was eating the response from the data context request, since it is nested inside.

    Once I wrapped it in a using block, the data context request stopped timing out.

    Tuesday, June 4, 2013 12:41 AM

All replies

  • Mystery solved.

    I have a general function to test connectivity to our server before trying to access data from the server. I thought it would be slick and attach it to the SendingRequest event handler of the data context. However I forgot to dispose of this "HasConnectivity" request, so I think my "HasConnectivity" WebRequest was eating the response from the data context request, since it is nested inside.

    Once I wrapped it in a using block, the data context request stopped timing out.

    Tuesday, June 4, 2013 12:41 AM
  • Hi,

    I'm glad to hear that you resolve this issue and thank you for sharing your solutions and experience here, it will be very beneficial for other community members who have similar questions.

    Best Regards.


    Haixia
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, June 4, 2013 2:27 AM
    Moderator