Skip to content
This repository has been archived by the owner on Jun 5, 2023. It is now read-only.

Access Denied alert and crash #103

Open
daniel-scatigno opened this issue Apr 14, 2020 · 7 comments
Open

Access Denied alert and crash #103

daniel-scatigno opened this issue Apr 14, 2020 · 7 comments

Comments

@daniel-scatigno
Copy link

daniel-scatigno commented Apr 14, 2020

Hello, I'm ruinning the sample application HelloWorld
and when the program starts it shows a message "Access Denied"
image

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.'

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)

@daniel-scatigno
Copy link
Author

daniel-scatigno commented Apr 14, 2020

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)

@bretehlert
Copy link

bretehlert commented Apr 27, 2020

In my experience an "Access is denied" error on Windows is caused by the failed creation of the WebView2 userDataFolder as described by #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.

@musictopia2
Copy link

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.

@ArieBen
Copy link

ArieBen commented Mar 16, 2021

was this resolved?

@Smurf-IV
Copy link

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

@musictopia2
Copy link

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.

@ArieBen
Copy link

ArieBen commented Mar 19, 2021

yes very interesting and it looks versatile too, looking into it... thanks a lot for the input.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants