Close and then open a new tab page or window asks authentication

Neha 20 Reputation points
2025-01-11T04:26:32.7333333+00:00

I am trying to embed a webform application in WinForm using Webview2 control. The new window opens in a tab page with webview2 child ( e.handled=true). But when destroying the child tab wm_destroy is not calling properly. so each time while open a new window/tab page I have to authenticate the page. How can I resolve this? Thanks in advance

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,917 questions
Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
5,705 questions
Universal Windows Platform (UWP)
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,195 questions
0 comments No comments
{count} votes

Accepted answer
  1. Bruce (SqlWork.com) 69,276 Reputation points
    2025-01-11T19:26:52.34+00:00

    By default webviews have their session and app data, so session cookies are not shared. To share between webviews, you must use the same persistent store for all webviews. See shared data in:

    https://zcusa.951200.xyz/en-us/microsoft-edge/webview2/concepts/user-data-folder?tabs=win32

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.