0

I am using FiddlerCore to write some automate test cases. THe problem which i am facing is sometimes fiddler does not shut down properly and hence the proxy remains set in IE. And the next time a test runs the pages does not load, as fiddler is closed and proxy is set. Is there a way that i can change the IE proxy through code. I want that no proxy option should be selected, as we can see when we go to Tools -> Internet options -> Connections -> LAN settings : No check box is selected. How can i achieve this using C# ? I have seen some posts on this, but nothing is specific to this requirement.

THanks!

Jash
  • 912
  • 3
  • 17
  • 37
  • If your app is throwing an exception and isn't shutting down properly, what makes you think that your app's code is going to be able to run? – EricLaw Jun 19 '13 at 16:26
  • possible duplicate of [Changing proxy settings programmatically in Windows for DSL connections](http://stackoverflow.com/questions/16896318/changing-proxy-settings-programmatically-in-windows-for-dsl-connections) – EricLaw Jun 19 '13 at 16:26

1 Answers1

0

I assume you set up Fiddler as a system proxy by calling something similar like:

FiddlerApplication.Startup(9999, FiddlerCoreStartupFlags.Default);

When your application exits make sure to call something like:

if (FiddlerApplication.IsStarted())
{
    FiddlerApplication.oProxy.PurgeServerPipePool();
    FiddlerApplication.Shutdown();
}

to make sure your system settings get restored.

User
  • 23
  • 1
  • 7