You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 processes the server actions sequentially -
Creates instance of Browser form, in turn creates instance of Web Browser control.
Navigates to action URL,
User responds to rendered action.
Application close/dispose the Browser form & in turn close Web Browser control
Takes next action for processing, repeats steps from 1 to 4.
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 ?
Can we have a singleton instance of WebView2 control used across multiple WinForm.
Once WebView2 control singleton instance is initialized, added to the WinForm controls list,
WinForm is closed and WebView2 control singleton instance is removed from the WinForm control list.
This discussion was converted from issue #3782 on October 10, 2023 18:15.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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 processes the server actions sequentially -
Creates instance of Browser form, in turn creates instance of Web Browser control.
Navigates to action URL,
User responds to rendered action.
Application close/dispose the Browser form & in turn close Web Browser control
Takes next action for processing, repeats steps from 1 to 4.
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 ?
Can we have a singleton instance of WebView2 control used across multiple WinForm.
Once WebView2 control singleton instance is initialized, added to the WinForm controls list,
WinForm is closed and WebView2 control singleton instance is removed from the WinForm control list.
Any help is appreciated.
Beta Was this translation helpful? Give feedback.
All reactions