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

Fiddlercore error "Could not load file or assembly"

3 Answers 403 Views
Windows
This is a migrated thread and some comments may be shown as answers.
Marcin
Top achievements
Rank 1
Marcin asked on 16 May 2019, 04:29 PM
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?

3 Answers, 1 is accepted

Sort by
0
Simeon
Telerik team
answered on 21 May 2019, 07:45 PM
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
0
Adom
Top achievements
Rank 1
answered on 31 Dec 2019, 12:09 PM
Hi,
I'm not sure if your project can run on Mac. If I remember correctly, System.Web.DataVisualization is an assembly from full (Windows-only) .NET Framework, and isn't available in .NET Core or Mono on non-Windows platforms, because it has an underlying dependency on IIS.
0
Boby
Telerik team
answered on 02 Jan 2020, 03:05 PM

Hello Adom,

FiddlerCore is .NET Standard 2.0 compatible and can run on Windows, Mac and Linux. The code in Telerik.NetworkConnections is OS-specific, but our intention was to use it only when running on compatible operating systems. Have you found a scenario where something is not working? If yes, could you share specific version, steps to reproduce, the expected, and the actual result, so that we can investigate this further?

Regards,
Boby
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
Marcin
Top achievements
Rank 1
Answers by
Simeon
Telerik team
Adom
Top achievements
Rank 1
Boby
Telerik team
Share this question
or