1

I am working on a Win8 Store app with an MVC Web Api OData v4 server.

I have set up a Win 8 unit test client project to debug OData Http requests to the OData server and I am using Fiddler v4.4.9.3 to monitor the Http traffic. Server and Client are both running on the local machine and the client service uri is set to localhost.fiddler:xxxx

I am able to see all the GET and POST requests in the Fiddler web sessions but PATCH/MERGE and DELETE requests from the client do not appear! (They are definitely present because they server controller methods execute.)

However, when I create and execute PATCH/MERGE and DELETE requests in the Fiddler composer they do appear in the web sessions.

I have checked for filters, rules, scripts, un-installed and re-installed Fiddler, followed the advice at Fiddler not displaying sessions etc but to no avail.

Does anyone know what the problem might be?

Community
  • 1
  • 1
AndyDBell
  • 968
  • 1
  • 7
  • 10
  • Are you by any chance using the sample clients provided on the [asp.net codeplex site](http://aspnet.codeplex.com/)? Some of those intercept the odata calls for debugging in the console, and I think by so doing they do no get routed through Fiddler, although I cannot say so so absolutely. I have noticed the same behavior when running those sample clients. – mdisibio Sep 02 '14 at 22:07

2 Answers2

4

This is expected if you are using the OData client library. When you try to update/delete an entity from client, the client loads the URLs from the payload you previously retrieved. Those URLs don't have ".fiddler" in it, and Fiddler can't capture them.

For example, you want to update a Product object. Normally you have to first query the object. In the object there's an Edit link stored some way. The edit link is a URL (which doesn't have ".fiddler" of course). Later when you try to update the product object, the client sends PUT/PATCH requests to the edit link.

tiano
  • 91
  • 1
  • 1
    This problem can be corrected by using the fiddler script to modify the odata.context url in response bodies from localhost:PPPPP localhost.fiddler:PPPPP. e.g. In static function OnBeforeResponse(oSession: Session) put oSession.utilReplaceInResponse("localhost:PPPPP", "localhost.fiddler:PPPPP" ) – AndyDBell Feb 24 '15 at 04:08
0

If you click Troubleshoot Filters and the traffic doesn't appear, that means that the traffic wasn't sent to Fiddler. That could be a bug in the client stack, although the calls should be failing because localhost.fiddler is only meaningful when traffic is going through Fiddler; you'll get a connection failure otherwise.

EricLaw
  • 56,563
  • 7
  • 151
  • 196
  • Thanks for your suggestion Eric. I tried Troubleshoot Filters but the Patch/Merge and Delete requests still do NOT appear. I have also compiled the project and run on another development machine with the same result. I see your point re localhost.fiddler but the requests are definitely there yet not appearing in the Fiddler session lists. – AndyDBell Sep 04 '14 at 01:45