Best practice to handle the CoreWebView2.ProcessFailed #2551
Unanswered
shlomizeevy
asked this question in
Q&A
Replies: 1 comment
-
hello @shlomizeevy Are you still looking for an answer to your question? If you still need a response, we can turn this into an Issue with a Question tag (which is typically how we address questions and bugs. The discussion thread might be more useful for off topic questions or non-issue related inquiries! Let me know if you'd like me to create an issue from this discussion, or if you'd prefer to add it. Thanks! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi All,
I am using WebView2 with my winform control, which I use as view in my custom pane, in an Excel addin.
I was wondering what is the best practice when getting the CoreWebView2.ProcessFailed event.
I tried registering to it from the control holding webView2, and restarting the webView2 by calling:
`` private async void OnAddinWebView2ProcessFailed(object sender, Microsoft.Web.WebView2.Core.CoreWebView2ProcessFailedEventArgs e)
{
WebView2.Dispose();
WebView2 = new AddinWebView2();
await InitializeAsync();
}
public async Task InitializeAsync()
{
var dataFolder = Path.Combine(Ctrl.AppContext.AppStoragePath, "edge_cache");
await WebView2.InitializeAsync(dataFolder, GetSource());
WebView2.AddinWebView2LoadCompleted += AddinWebView2LoadCompleted;
WebView2.AddinWebView2UserOperation += OnWebView2UserOperation;
WebView2.AddinWebView2ProcessFailed += OnAddinWebView2ProcessFailed;
}
``
Doesn't seem to do the trick though.
Any ideas?
Thanks in advanced,
Shlomi
Beta Was this translation helpful? Give feedback.
All reactions