HttpWebRequest Response Correct, Same URL Incorrect in Browser RRS feed

  • Question

  • Try listening to the X-Files theme song when reading this question, for atmosphere.

    I have an enterprise C# WPF REST application deployed on Windows Server 2012 and IIS 8. Windows Authentication is enabled and SSL is required. The service can receive a customer id and returns some information about the customer account, say, a list of boolean values.

    A colleague is developing a front-end integration in another system from behind an enterprise hardware firewall. Most of the time, the data returned by the service is correct, and QA and UAT have confirmed this. But after the service has been running for a while, users begin to receive incorrect data. All customer ids return the exact same boolean values, for example, even if previous calls to the method were correct.

    Yet, running a console app that uses the exact same code headless, the data is always correct. Another console app, which uses HttpWebRequest to get data from the service, always returns correct data as well, even after iterating hundreds of times making the same url.

    It gets weirder, after I run this test which iterates hundreds of times making the same request, future calls from a web browser will be correct for an indeterminate but non-insignificant period of time. The only way to fix the bug is to spam the service with HttpWebRequest calls.

    I think that there might be a configuration issue in IIS. Is there anyone who has seen similar behavior from a WCF web service as well?

    Tuesday, November 24, 2015 9:31 PM


  • Hi bdcroteau,

    According to your description, I am not sure what went wrong.

    You said  when used HttpWebRequest Response then that is  Correctly, so that means your

    service is running correctly.

    So, in my opinion, you can set a trace file with web,config file  and use the fiddler tool to

    debug project.

    For more information, please refer to the following articles:

    1.Configuring Tracing

    2.Debug WCF REST Service.

    I hope that will be helpful to you.

    Best Regards,


    Wednesday, November 25, 2015 10:44 AM