Rise-Media-Player icon indicating copy to clipboard operation
Rise-Media-Player copied to clipboard

release_vnext: UnauthorizedAccessException: Access is denied On Startup On Windows 11

Open jimddavis opened this issue 1 year ago • 1 comments

Description

Code version Rise-Media-Player-release_vnext.

Trying to get the release_vnext running on Windows 11. It builds, but when I start with debugging it throws an error on startup at the following line:

LIne 45 of Rise.App App.xaml.cs, public static SettingsViewModel SViewModel { get; } = new(); throws an UnauthorizedAccessException: Access is denied error when trying to create the appsettings.

My environment is: Windows 11 10.0.22621 Visual Studio 2022 Version 17.6.2 .Net Framework Version 4.8.09032

Here is the error. `System.TypeInitializationException HResult=0x80131534 Message=The type initializer for 'Rise.App.App' threw an exception. Source=Rise Media Player StackTrace: at Rise.App.App.get_SViewModel() in C:\Learn_WinUI\Rise-Media-Player-release_vnext\Rise Media Player Dev\App.xaml.cs:line 45

This exception was originally thrown at this call stack: Rise.Common.Extensions.AsyncExtensions.Get<TResult>(Windows.Foundation.IAsyncOperation<TResult>) in AsyncExtensions.cs Rise.App.App.OnStorageLibraryRequested(Windows.Storage.KnownLibraryId) in App.xaml.cs Rise.App.App.App() in App.xaml.cs

Inner Exception 1: UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))`

Steps To Reproduce

No response

Expected behavior

Startup without an exception

Rise Media Player Version

Rise-Media-Player-release_vnext

Windows Version

Windows 11 10.0.22621

Relevant Assets/Logs

RiseError

jimddavis avatar Jun 11 '23 11:06 jimddavis

Have you granted the app access to the music/video library? It seems like it's pointing to the wrong line here, but the exception seems to point to it trying to access the media library.

itsWindows11 avatar Jun 14 '23 14:06 itsWindows11