Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

.NET Maui Blazor web assembly, on Windows, what capabilities do I need to access a SQLite database stored in FileSystem.AppDataDirectory?

$
0
0

This question is specifically for Windows. I have a .NET Maui Blazor web assembly app that accesses a SQLite database located in FileSystem.AppDataDirectory.

More specifically, the base path to my db is determined by this:

var basePath = Path.GetFullPath("..", FileSystem.AppDataDirectory);

The app runs great with runFullTrust, but I would like to remove runFullTrust. In doing so, I changed my Package.appxmanifest to this:

<Applications><Application Id="App" Executable="myApp.exe" EntryPoint="Windows.PartialTrustApplication">

My Package.appxmanifest file has the following capabilities:

<Capabilities><Capability Name="internetClient"/><uap:Capability Name="documentsLibrary"/><uap:Capability Name="picturesLibrary"/><uap:Capability Name="userAccountInformation"/><Capability Name="privateNetworkClientServer"/><DeviceCapability Name="webcam"/><DeviceCapability Name="location"/></Capabilities>

I get this exception:

Access to the path 'C:\Users\me\AppData\Local\Packages\company.app_ns00xv7ymf8n4' is denied.

Do I need different capabilities or maybe need to store my SQLite database in another location?

Thanks for any help.


Viewing all articles
Browse latest Browse all 4839

Trending Articles