FiddlerCore is blocking all redirects

3 posts, 0 answers
  1. Andy Spears
    Andy Spears avatar
    9 posts
    Member since:
    Nov 2005

    Posted 25 Dec 2015 Link to this post

    I am using Chromium to embed an web browser in a winforms app.  I insert custom JavaScript into the pages to automatically redirect the user to a login page if a certain HTML condition exists.  All this works as expected so I then added FiddlerCore with the hopes of modifying certain HTTP requests.  The problem is as long as FiddlerCore is running, page redirects initiated via JavaScript calls are canceled (see attached image).  I have very minimal code running, so I'm guessing I'm missing a configuration setting somewhere.  Any help would be greatly appreciated.  Below is the FiddlerCore code that I'm using:


    public void Start()
        if (!IsStarted)
            IsStarted = true;
            Fiddler.FiddlerApplication.BeforeRequest += FiddlerApplication_BeforeRequest;
            Fiddler.FiddlerApplication.BeforeResponse += FiddlerApplication_BeforeResponse;
            // For forward-compatibility with updated FiddlerCore libraries, it is strongly recommended that you
            // start with the DEFAULT options and manually disable specific unwanted options.
            FiddlerCoreStartupFlags oFCSF = FiddlerCoreStartupFlags.Default;
            // NOTE: In the next line, you can pass 0 for the port (instead of 8877) to have FiddlerCore auto-select an available port
            int iPort = 8877;
            Fiddler.FiddlerApplication.Startup(iPort, oFCSF);
            FiddlerApplication.Log.LogFormat("Created endpoint listening on port {0}", iPort);
    public void Stop()
        if (IsStarted)
            IsStarted = false;
            Fiddler.FiddlerApplication.BeforeRequest -= FiddlerApplication_BeforeRequest;
            Fiddler.FiddlerApplication.BeforeResponse -= FiddlerApplication_BeforeResponse;
    void FiddlerApplication_BeforeRequest(Fiddler.Session oSession)
    void FiddlerApplication_BeforeResponse(Fiddler.Session oSession)
  2. Eric Lawrence
    Eric Lawrence avatar
    832 posts

    Posted 28 Dec 2015 Link to this post

    Hi, Andy--

    You should hook up the OnNotification and OnLogString handlers as shown in the demo Program.cs. After you do so, I expect you'll find that there are error messages complaining that FiddlerCore isn't able to generate certificates for HTTPS interception because the certificate generator can't be found, or similar messages indicating that you haven't yet configured the system to trust FiddlerCore's root certificate (since I don't see any code that does that below)

    Eric Lawrence
    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
  3. Andy
    Andy avatar
    1 posts
    Member since:
    Jan 2012

    Posted 30 Dec 2015 in reply to Eric Lawrence Link to this post

    Thanks, that helped me get the information that I needed.
Back to Top