I have following code to launch webview
var env = await Microsoft.Web.WebView2.Core.CoreWebView2Environment.CreateAsync(userDataFolder: Path.Combine(Path.GetTempPath(), $"{Environment.UserName}_Browser"));
await webView21.EnsureCoreWebView2Async(env);
var url = $"Field1=A2&TypeId=1&ItemId=1234";
var postData = new System.IO.MemoryStream(System.Text.Encoding.UTF8.GetBytes(url));
var request = webView21.CoreWebView2.Environment.CreateWebResourceRequest("https://xxxx/xxxx", "POST", postData, "Content-Type: application/x-www-form-urlencoded");
webView21.CoreWebView2.NavigateWithWebResourceRequest(request);
As for my understanding, providing unique userDataFolder should not create problem when multiple users using the application on a same server. It works for some but for some users throws the exception. Is there anything Im missing?
Using Microsoft.Web.WebView2 -Version 1.0.1108.44
Exception
System.Runtime.InteropServices.COMException (0x800700AA): The requested resource is in use. (Exception from HRESULT: 0x800700AA)
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at Microsoft.Web.WebView2.Core.CoreWebView2Environment.<CreateCoreWebView2ControllerAsync>d__54.MoveNext()