How to remove certificate messages from Webbrowser?

Asked

Viewed 582 times

3

How do I remove those annoying messages showing that the page certificate is not valid or insecure from the component System.Windows.Forms.WebBrowser? I’ve tried many ways and I haven’t found an alternative...

One of the alternatives was to define this property:

WebBrowser1.ScriptErrorsSuppressed = True

but it did not help, the other was to download a component called "Geckofx" (the Mozilla browser) but it has no support for HTML5...

  • 3

    Show the diversas maneiras, so you avoid answers with what you’ve tried and didn’t work ;)

  • I’ve improved the question

1 answer

1


Try to call it that before you open the webbrowser

ServicePointManager.ServerCertificateValidationCallback =
new RemoteCertificateValidationCallback(
    delegate
    { return true; }
);

Withdrawn of this answer of Soen

In fact, it is recommended that you understand the impact of ignoring these messages.

EDIT: I ended up leaving the answer in the original language. I don’t program VB.Net but I believe this is the equivalent.

ServicePointManager.ServerCertificateValidationCallback = New RemoteCertificateValidationCallback(Function() True)
  • But put that where? No Webbrowser1.Load?

  • 1

    Did you make it? @Cypherpotato

  • No, @Jeferson Bueno, because I don’t know where I put this statement...

  • Ah, put it on the screen. I thought I got it because I marked the answer as correct.

  • I marked it as correct because it makes sense and it’s the only answer you have

Browser other questions tagged

You are not signed in. Login or sign up in order to post.