/// <summary> /// Starts listening at the specified port. /// </summary> public void Start() { Startup.Listener = this; m_host = new WebHostBuilder(); HttpsConnectionFilterOptions httpsOptions = new HttpsConnectionFilterOptions(); httpsOptions.CheckCertificateRevocation = false; httpsOptions.ClientCertificateMode = ClientCertificateMode.NoCertificate; httpsOptions.ServerCertificate = m_serverCert; httpsOptions.SslProtocols = SslProtocols.Tls | SslProtocols.Tls11 | SslProtocols.Tls12; m_host.UseKestrel(options => { options.NoDelay = true; options.UseHttps(httpsOptions); }); m_host.UseContentRoot(Directory.GetCurrentDirectory()); m_host.UseStartup<Startup>(); m_host.Build(); m_host.Start(Utils.ReplaceLocalhost(m_uri.ToString())); }