Table of Contents

Class CoreWebView2ProcessFailedEventArgs

Namespace
Microsoft.Web.WebView2.Core
Assembly
Microsoft.Web.WebView2.Core.dll

Event args for the ProcessFailed event.

public class CoreWebView2ProcessFailedEventArgs : EventArgs
Inheritance
CoreWebView2ProcessFailedEventArgs
Inherited Members

Properties

ExitCode

Gets the exit code of the failing process, for telemetry purposes.

public int ExitCode { get; }

Property Value

int

Remarks

The exit code is always 1 when ProcessFailedKind is BrowserProcessExited, and STILL_ACTIVE(259) when ProcessFailedKind is RenderProcessUnresponsive.

FailureSourceModulePath

When ProcessFailed occurred due to a failed Code Integrity check, this property returns the full path of the file that was prevented from loading on the system.

public string FailureSourceModulePath { get; }

Property Value

string

FrameInfosForFailedProcess

Gets the collection of CoreWebView2FrameInfos for frames in the CoreWebView2 that were being rendered by the failed process.

public IReadOnlyList<CoreWebView2FrameInfo> FrameInfosForFailedProcess { get; }

Property Value

IReadOnlyList<CoreWebView2FrameInfo>

Remarks

The content in these frames is replaced with an error page. This is only available when ProcessFailedKind is FrameRenderProcessExited; the returned collection is empty for all other process failure kinds, including the case in which the failed process was the renderer for the main frame and subframes within it, for which the failure kind is RenderProcessExited.

ProcessDescription

Gets a description of the failing process, assigned by the WebView2 Runtime.

public string ProcessDescription { get; }

Property Value

string

Remarks

This is a technical English term appropriate for logging or development purposes, and not localized for the end user. It applies to utility processes (for example, "Audio Service", "Video Capture") and plugin processes (for example, "Flash"). The returned string is empty if the WebView2 Runtime did not assign a description to the process.

ProcessFailedKind

Gets the kind of process failure that has occurred.

public CoreWebView2ProcessFailedKind ProcessFailedKind { get; }

Property Value

CoreWebView2ProcessFailedKind

Remarks

ProcessFailedKind is a combination of process kind (for example, browser, renderer, gpu) and failure (exit, unresponsiveness). Renderer processes are further divided in main frame renderer (RenderProcessExited, RenderProcessUnresponsive) and subframe renderer (FrameRenderProcessExited). To learn about the conditions under which each failure kind occurs, see CoreWebView2ProcessFailedKind.

Reason

Gets the reason for the process failure.

public CoreWebView2ProcessFailedReason Reason { get; }

Property Value

CoreWebView2ProcessFailedReason

Remarks

Some of the reasons are only applicable to specific values of ProcessFailedKind, and the following ProcessFailedKind values always return the indicated reason value:

ProcessFailedKindReason
BrowserProcessExited Unexpected
RenderProcessUnresponsive Unresponsive

For other ProcessFailedKind values, the reason may be any of the reason values. To learn about what these values mean, see CoreWebView2ProcessFailedReason.