Import Certificate Error - WeOnlyDo Discussion board

Import Certificate Error (wodWebServer / wodWebServer.NET)

by Jasmine, Wednesday, December 21, 2022, 21:23 (492 days ago) @ Danny

Hi Danny.

I just tried, for a test, with a certificate from selfsigned.org, works like a charm. I had following code and it works correctly with our SSL sample:


            System.Security.Cryptography.X509Certificates.X509Certificate2 cert = new System.Security.Cryptography.X509Certificates.X509Certificate2();

            cert.Import(AppPath() + "\\localhost.com.pfx", "password", System.Security.Cryptography.X509Certificates.X509KeyStorageFlags.Exportable);

            web1.Certificate = cert;
            web1.Secure = true;
            web1.SecureMethod = System.Security.Authentication.SslProtocols.Tls13;
            web1.Start();

Complete thread: