C# webview2 can’t loading popup page - Stack Overflow

I’m implementing a specific authentication flow using WebView2. When clicking on an HTML element on a s

I’m implementing a specific authentication flow using WebView2. When clicking on an HTML element on a specific domain, a new window opens, sends a session authentication request to another domain, and then redirects to a new URL. However, I’m facing an issue when trying to handle this process in WebView2.

Current Situation:

When clicking a button on a specific domain, a popup window opens. The popup window undergoes the following process: Initial URL: about:blank (blank page) Then redirects: Authentication domain → Final target domain. I attempted to handle the popup in a new WebView2 instance using the NewWindowRequested event. The issue is that when I set e.Handled = true to block the popup, and then try to load the URL in a new WebView2 instance, it stops at about:blank and doesn’t proceed with the redirection.

Issues:

The initial URL of the popup is always about:blank, and the redirection doesn’t proceed. When I set e.Handled = false to unblock the popup, the popup opens in the default Edge browser, and the authentication and redirection process works as expected. However, in the new WebView2 control, the process gets stuck at about:blank, and the redirection does not occur. Let me know if you'd like to make further adjustments!

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745631267a4637123.html

相关推荐

  • C# webview2 can’t loading popup page - Stack Overflow

    I’m implementing a specific authentication flow using WebView2. When clicking on an HTML element on a s

    22天前
    40

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信