This is a migrated thread and some comments may be shown as answers.

FiddlerCore doesn't show traffic

1 Answer 68 Views
Windows
This is a migrated thread and some comments may be shown as answers.
Abdullah
Top achievements
Rank 1
Abdullah asked on 12 Aug 2019, 10:49 AM

For study purposes I tried to make a simple app to learn capturing web traffic. but it didn't capture any traffic. Can you help me to figure out what is wrong here:

 

        void Start()
        {
            FiddlerApplication.Prefs.SetBoolPref("fiddler.certmaker.CleanupServerCertsOnExit", true);
            FiddlerCoreStartupSettings startupSettings =
                new FiddlerCoreStartupSettingsBuilder()
                    .ListenOnPort(8888)
                    .DecryptSSL()
                    .OptimizeThreadPool()
                    .Build();

            CertMaker.createRootCert();
            FiddlerApplication.Startup(startupSettings);
            FiddlerApplication.AfterSessionComplete += FiddlerApplication_AfterSessionComplete;
        }

        private void FiddlerApplication_AfterSessionComplete(Session oSession)
        {
            string reqHeaders = oSession.oRequest.headers.ToString();
            var reqBody = Encoding.UTF8.GetString(oSession.RequestBody);

            string respHeaders = oSession.oResponse.headers.ToString();
            var respBody = Encoding.UTF8.GetString(oSession.ResponseBody);

            string output = reqHeaders + "\r\n" +
                (!string.IsNullOrEmpty(reqBody) ? reqBody + "\r\n" : string.Empty) +
                "==========================================================" + "\r\n\r\n" +
                respHeaders + "\r\n" +
                (!string.IsNullOrEmpty(respBody) ? respBody + "\r\n" : string.Empty) +
                "==========================================================" + "\r\n\r\n";

            BeginInvoke(new Action<string>((text) =>
            {
                textBoxTraffic.AppendText(text);
            }), output);
        }

1 Answer, 1 is accepted

Sort by
0
Eric R | Senior Technical Support Engineer
Telerik team
answered on 19 Aug 2019, 07:26 PM
Hi Abdullah,

I recommend adding the system proxy configuration because it looks like the StartUpSettingsBuilder is missing the .RegisterAsSystemProxy() call. However, without seeing the project I am not sure what the application type is or what the application is trying to do. 

If you would prefer I review the sample please provide it in this thread. Let me know if you need any additional information. Thank you.

Regards,

Eric R | Technical Support Engineer
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Windows
Asked by
Abdullah
Top achievements
Rank 1
Answers by
Eric R | Senior Technical Support Engineer
Telerik team
Share this question
or