When opening a WPF window with a WebView2 component from a COM Office addin the following error occurs during a call to EnsureCoreWebView2Async(null)
. The Office application window is set as owner of the new WPF window.
System.UnauthorizedAccessException: 'Access denied (Exception HRESULT: 0x80070005(E_ACCESSDENIED))'
Interestingly, when calling the same window from a pure WPF application the window and webview2 work perfectly. Also without the WebView2 component the window works.