public static void Main(string[] args) { MyWebBrowser browser = new MyWebBrowser(); browser.Navigate("about:blank"); browser.DocumentCompleted += delegate(object obj, WebBrowserDocumentCompletedEventArgs e) { if (e.Url.ToString() == "about:blank") { // This is the SSL path where certificate error occurs browser.Navigate("https://localhost"); } }; while (browser.ReadyState != WebBrowserReadyState.Complete) { Application.DoEvents(); // RunOtherEvents(); } }
public MyWebBrowserSite(MyWebBrowser myWebBrowser) : base(myWebBrowser) { this.myWebBrowser = myWebBrowser; }