CoreWebView2Profile.EnhancedSecurityModeState Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
The EnhancedSecurityModeState property allows you to control whether Enhanced Security Mode is enabled or disabled for WebView2 instances associated with a profile. This applies to all WebViews sharing the same profile.
The configuration is not persisted to the user data folder. The property is reset when the profile is recreated.
The default value is Disabled.
When set to Disabled, Enhanced Security Mode is disabled. When set to Enabled, Enhanced Security Mode is enabled.
See CoreWebView2EnhancedSecurityModeState for descriptions of states.
public Microsoft.Web.WebView2.Core.CoreWebView2EnhancedSecurityModeState EnhancedSecurityModeState { get; set; }
member this.EnhancedSecurityModeState : Microsoft.Web.WebView2.Core.CoreWebView2EnhancedSecurityModeState with get, set
Public Property EnhancedSecurityModeState As CoreWebView2EnhancedSecurityModeState
Property Value
Remarks
Changes apply immediately to new navigation. Existing pages require a reload for the change to take effect.
The EnhancedSecurityModeState setting is not persisted in the user data folder. It resets to the default value of Disabled when the profile is destroyed and recreated.