有没有办法阻止WebView2启动Windows Network Diagnostics窗口?
在我带有WebView2控件的WPF应用程序中,要求页面内的任何交互(例如单击链接)都不会启动任何外部窗口(即任何不属于应用程序的窗口)。
如果页面无法访问WebView2的加载或发生超时,则显示ERR_TIMED_OUT页面,并显示了运行Windows网络诊断的链接,如下所示。
单击“运行Windows网络诊断”链接时,它会启动MSDT.EXE。
有没有办法防止WebView2启动其他应用程序和MSDT.EXE(例如MSDT.EXE)?
In my WPF application with WebView2 control, it is required that any interaction (like clicking links) inside the page does not launch any external windows (i.e. any windows that is not part of the application).
In case a page the WebView2 is loading is not accessible or a timeout occurs, ERR_TIMED_OUT page is displayed with a link to run Windows Network Diagnostics as shown below.
When clicking "Running Windows Network Diagnostics" link, it launches msdt.exe.
Is there a way to prevent WebView2 from launching other applications and windows like msdt.exe?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用
corewebview2.settings.isbuiltinerrorpageEnabled
disable in Indrore ofror Pages,然后在“ nofollow noreferrer”>code> code> core> core> core> core> core> core> core> core>并显示您自己的错误页面。
You can use
CoreWebView2.Settings.IsBuiltInErrorPageEnabled
to disable built in error pages, and then inCoreWebView2.NavigationCompleted
watch for errors and show your own error page.