06 March 2015
I ran fiddler to analyse what was going on, and I found that the application works well while fiddler is running. but not other wise. I did some research and found this article:
http://blogs.telerik.com/fiddler/posts/13-02-28/help!-running-fiddler-fixes-my-app-
Basit
I followed the suggestion in the app and did some research to adjusted some configuration but it wasn't very helpful. Since the application has to go into production soon, I had to come up with a quick solution to fix this problem.
I decided to integrate fiddler with in the app using Fiddler SDK a.k.a FidderCore. Steps:
- Downloaded FiddlerCore SDK from here: http://www.telerik.com/fiddler/fiddlercore
- Created a folder 3rdParty in my SolutionFolder
- Copied FiddlerCore Dlls (.net 4) to SolutionFolder\3rdParty. Added references to FiddlerCore.dll to my WPF application.
- Handled ApplicationStartUp Event in WPF application (You can use Program.cs file in Winforms app):
Fiddler.CONFIG.IgnoreServerCertErrors = false;
FiddlerApplication.Prefs.SetBoolPref("fiddler.network.streaming.abortifclientaborts", true);
FiddlerCoreStartupFlags oFCSF = FiddlerCoreStartupFlags.Default;
oFCSF = (oFCSF & ~FiddlerCoreStartupFlags.RegisterAsSystemProxy);
int iPort = 8877;
Fiddler.FiddlerApplication.Startup(iPort, oFCSF);
- Handled ApplicationExit Event
Fiddler.FiddlerApplication.Shutdown();
- Adjusted the app.config binding file as follow:
... useDefaultWebProxy="false" proxyAddress="http://127.0.0.1:8877" ...And that's it! The application works 10x times faster now. Leave a thumbs up if this article helps you.
Basit
No comments:
Post a Comment