WebWindow
WebWindow copied to clipboard
Access Denied alert and crash
Hello, I'm ruinning the sample application HelloWorld
and when the program starts it shows a message "Access Denied"
After i Hit ok the follow exception is thrown: Exception has occurred: CLR/System.AccessViolationException An unhandled exception of type 'System.AccessViolationException' occurred in WebWindow.dll: 'Attempted to read or write protected memory. This is often an indication that other memory is corrupt.' <Cannot evaluate the exception stack trace>
I'm running Under Windows 10 Pro Version 10.0.18363 Build 18363 I have installed Microsoft Edge Version 81.0.416.53 (Official build) (64-bit)
Well, this have something to do with dotnet permissions, If I run the application by executing the exe file it works fine, if I issue a dotnet HelloWorld.dll it doesn't I think dotnet is launching it with some weird permissions, it's not creating a folder inside the application (The one the browser uses to store things)
In my experience an "Access is denied" error on Windows is caused by the failed creation of the WebView2 userDataFolder as described by https://github.com/SteveSandersonMS/WebWindow/issues/100
When you launch the program using dotnet it probably tries to create a folder next to the dotnet.exe which you should not have permissions to do.
I tried to create the exe to run. I even tried to do a publish and run it. Both still gave the access denied. I wish there was a way to fix this because I really wanted a way to run native apps with blazor and not just go to a webpage.
was this resolved?
I "resolved it" temporarily, by installing into the users AppData
.
Not ideal, but it allows the WebView to "do its thing".
Will wait for the WebView to start using ProgramData
properly, as has been requested in others who have raised this issue
There is a brand new project that was based on this one here https://www.tryphotino.io/ I tried this one and did not run into any problems. Was able to run the sample project with no problems on windows desktop. Its a good temporary solution until .net 6 comes out.
yes very interesting and it looks versatile too, looking into it... thanks a lot for the input.