0

FiddlerCore seems to have a ton of functionality around managing http requests including parsing headers, parsing and decoding body content, searching for content within a request, etc. Additionally there's the functionality to replay captured requests.

I'd like to use these features on requests that my web application receives directly, for example via an ASP.NET MVC or Web API controller.

In this scenario, I am am natively capturing the request, so I don't need or want FiddlerCore's proxy functionality. I just want to use the bits of FiddlerCore that manage and manipulate requests.

Can I use the above functionality of FiddlerCore and not enable a proxy?

Howiecamp
  • 2,981
  • 6
  • 38
  • 59

1 Answers1

0

It sounds like you're asking "How do I run FiddlerCore as a reverse proxy?"

  1. Move the target service to a different port (e.g. 81 instead of 80)
  2. Call FiddlerApplication.Startup with the original service port (e.g. 80)
  3. In your FiddlerCore application's BeforeRequest handler, rewrite the port of inbound requests to point to the target port (e.g. 81).
EricLaw
  • 56,563
  • 7
  • 151
  • 196
  • My current understanding of FidderCore is such that I may not even be asking valid questions.A few follow-ups:1.What if I already have the request eg in an MVC controller I have access to the full request object. So there's no proxy or reverse proxy involved. Once I have the request, can I use FidderCore's functionality to parse or replay the request, or *must* I use FidderCore as a proxy/reverse proxy in order to do those types of things? 2.Please help me understand why a reverse proxy. 3.Is the use case of receiving an http request and then replaying that request a good fit for FiddlerCore? – Howiecamp Jun 27 '15 at 04:34
  • When you say: "the full request object", you're referring to some sort of .NET object that has been created by ASP.NET from the HTTP(S) traffic. Fiddler has no knowledge of that object; it operates on HTTP(S) traffic itself, not the abstractions created by other applications or frameworks. You could theoretically use the .NET object to recreate the original HTTP(S) traffic and use FiddlerCore to interact with it, but it's unlikely that this would be the best approach; if you're using the .NET objects, just use the .NET objects. – EricLaw Jun 30 '15 at 16:30
  • Thanks Eric, I understand now. Basically what I get from your answer is that if I want to use Fiddler's magic I must use fiddler to do the captures- understood. Can you please see my 2nd and 3rd questions? Thanks in advance I really appreciate it. – Howiecamp Jun 30 '15 at 20:10
  • 1
    A reverse proxy is a proxy that runs on the server, not the client. If you run FiddlerCore on the server, the client doesn't even know it's there and doesn't need any special configuration. And yes, the primary functionality of Fiddler and FiddlerCore is to receive a HTTP request and then send it somewhere. – EricLaw Jun 30 '15 at 21:00