Fiddlercore error "Could not load file or assembly"

2 posts, 0 answers
  1. Marcin
    Marcin avatar
    1 posts
    Member since:
    Oct 2016

    Posted 16 May Link to this post

    Hi, when I'm trying to run this little program I get this error after line  Fiddler.FiddlerApplication.Startup(startupSettings);
    {"Could not load file or assembly 'Telerik.NetworkConnections, Version=0.1.1.0, Culture=neutral, PublicKeyToken=67cb91587178ac5a'.
    System.IO.FileNotFoundException

    my program code (console application, in main class I use Http_proxy.Start();

    public static class Http_proxy
        {
            public static void Start()
            {
                FiddlerCoreStartupSettings startupSettings =
                    new FiddlerCoreStartupSettingsBuilder()
                        .ListenOnPort(0)
                        .RegisterAsSystemProxy()
                        .DecryptSSL()
                        .Build();
                Fiddler.FiddlerApplication.Startup(startupSettings);
                FiddlerApplication.AfterSessionComplete += Http_proxy.AfterSessionComplete;
            }
            public static void Stop()
            {
                if (FiddlerApplication.IsStarted()) Fiddler.FiddlerApplication.Shutdown();
            }
            private static void AfterSessionComplete(Session session)
            {
                session.bBufferResponse = true;
                if (session.fullUrl.Contains("nevermind"))
                {
                    string b = session.GetRequestBodyAsString();
                    File.WriteAllText(@"..\a.txt", b);
                }
            }
            public static bool InstallCertificate()
            {
                try
                {
                    if (!CertMaker.rootCertExists() && !CertMaker.createRootCert())
                    {
                        throw new Exception("Could not create Root Certificate!");
                    }
                    if (!CertMaker.rootCertIsTrusted() && !CertMaker.trustRootCert())
                    {
                        throw new Exception("Could not find valid Root Certificate for Fiddler!");
                    }
                    return true;
                }
                catch (Exception ex)
                {
                    Console.Write(ex.ToString() + "  |  " + "Certificate Installer Error!");
                    return false;
                }
            }
            public static bool UninstallCertificate()
            {
                if (CertMaker.rootCertExists())
                {
                    if (!CertMaker.removeFiddlerGeneratedCerts(true))
                        return false;
                }
                return true;
            }
        }
    }

     

    Some time ago I created another small app using Fiddler.FiddlerApplication.Startup(8888, true, true); and everything worked fine, now I lost it and upgraded Visual Studio Community 2015 to Community 2019 and nothing want to work. Any suggestions?

  2. Simeon
    Admin
    Simeon avatar
    228 posts

    Posted 21 May Link to this post

    Hello Marcin,

    Here you could read more about the Telerik.NetworkConnections.* assemblies and how to load them. Please, let me know if you need any further assistance.

    Regards,
    Simeon
    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
Back to Top