I can make the proxy setting of Webview2 at the first initialize but I need to change them multiple time during runtime, when I try to do it again I get this error
System.ArgumentException: 'WebView2 was already initialized with a different CoreWebView2Environment. Check to see if the Source property was already set or EnsureCoreWebView2Async was previously called with different values.'
How can I do that? My code is:
Dim options As CoreWebView2EnvironmentOptions = New CoreWebView2EnvironmentOptions With {.Language = "en-GB"}
options.AdditionalBrowserArguments = "--proxy-server=geo.xxxxx.com:12345"
Dim webView2Environment As CoreWebView2Environment = Nothing
webView2Environment = Await CoreWebView2Environment.CreateAsync(Nothing, Nothing, options)
Await WebView21.EnsureCoreWebView2Async(webView2Environment)
I tried the above code and it did not work