Replies: 1 comment
-
Hi @ukalhapu may you check if the CookieManager API solves your problem? https://learn.microsoft.com/en-us/dotnet/api/microsoft.web.webview2.core.corewebview2cookiemanager?view=webview2-dotnet-1.0.1823.32 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We have legacy VB.NET application which uses IE Web Browser Control.
Browser form (Win Form) has been designed placing IE Web Browser control.
Application process the server actions sequentially -
First action usually the login action, asks for authentication, user supplies user name and password, it supports both - Basic authentication & Form based authentication.
Web Browser Control/WinINet automatically shares the login credentials (Authorization headers in case of basic authentication) & cookies across server request even though we are creating new instance to process each new request.
It maintains browser session across different instances created.
Application relied on this capability & not required to store credentials and explicitly adding Authorization header and/or cookies on the http request.
We are now replacing Web Browser Control with WebView2, but observed that WebView2 does not share Authorization headers and/or cookies across different instances of WebView2, We have created instance of WebView2 with default CoreWebView2Environment settings.
First login request is processed, asks for authentication, user supplies user name and password, WebView2 instance get closed,
New instance get created to process the next request but again asks for Authentication.
How can we achieve the capability as provided by Web Browser Control ?
What WebView2 setting & API should be used ?
Beta Was this translation helpful? Give feedback.
All reactions