Can I use ServicePointManager with a Webbrowser control?

I want to disable the "warning window" that I get on the login page to one HTTPS site with an "untrusted certificate".

ServicePointManager is used for WebRequest / WebResponse:

> public static bool
> ValidateServerCertificate(object
> sender, X509Certificate certificate,
> X509Chain chain, SslPolicyErrors
> sslPolicyErrors) {
>     return true; }
> 
> ServicePointManager.ServerCertificateValidationCallback
> = new RemoteCertificateValidationCallback(ValidateServerCertificate);

but how can I use it with a webbrowser control?

+3
source share
2 answers

ServicePointManager is for managed code; WebBrowser is a wrapper around shdocvw, so there will almost certainly be a completely different programming model.

( , ), , COM-, API (.: AxWebBrowser). WebBrowser .NET- - .

- (WebClient/WebRequest/etc) html WebBrowser, ..

+3

, , ServicePointManager ServicePoint WebBrowser, .

. , .

0

Source: https://habr.com/ru/post/1698025/


All Articles