Imran Yaseen
Imran Yaseen

Reputation: 535

WebView2.CoreWevView2 is missing ServerCertificateErrorDetected event handler

I am developing a WPF application in .NET 4.8. I have installed the WebView2 through NuGet package

<package id="Microsoft.Web.WebView2" version="1.0.1210.39" targetFramework="net48" />

I am trying to handle the server certificate error. But when I try to access this event handler it seems the CoreWebView2 doesn't recognize it.

enter image description here

I tried to create a simple project in WPF and installed the WebView2 using NuGet package with the exact version but still, I can't see this event handler there. I have also realized that there are some more events that are missing.

Thanks in advance.

Upvotes: 0

Views: 527

Answers (1)

David Risney
David Risney

Reputation: 4377

CoreWebView2.ServerCertificateErrorDetected is only available in prerelease nuget packages 1.0.1222 and more recent. See the CoreWebView2.ServerCertificateErrorDetected documentation which lists the applicable versions at the bottom.

You can change your webview2 nuget package to the latest prerelease version to try this API.

Upvotes: 1

Related Questions