I wanted to test FiddlerCore.
Found this -> http://www.c-sharpcorner.com/UploadFile/d9e6f2/capturing-http-traffic-in-C-Sharp/
I wrote it but for me it not capturing.
My code:
delegate void UpdateUI();
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
Fiddler.FiddlerApplication.AfterSessionComplete += FiddlerApplication_AfterSessionComplete;
Fiddler.FiddlerApplication.Startup(0, FiddlerCoreStartupFlags.Default);
}
void FiddlerApplication_AfterSessionComplete(Fiddler.Session oSession)
{
listBox1.Invoke(new UpdateUI(() =>
{
listBox1.Items.Add(oSession.url);
}));
}
private void Form1_Closing(object sender, FormClosingEventArgs e)
{
Fiddler.FiddlerApplication.Shutdown();
}
It works for me. Have you wired Form Load and Form Closing events to the form? Can you please provide source of InitializeComponent() method. I suspect that you are missing this:
Btw, what OS are you using?