Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

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?

share|improve this question
    
Are you by any chance using the sample clients provided on the asp.net codeplex site? 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 2 '14 at 22:07

2 Answers 2

up vote 1 down vote accepted

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.

share|improve this answer
    
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 at 4:08

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.

share|improve this answer
    
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 4 '14 at 1:45
    
No, there's no magic here. –  EricLaw Sep 4 '14 at 2:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.