private async void lstPlayList_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
await new MessageDialog(lstPlayList.SelectedValue.ToString()).ShowAsync();
StorageFile mediaFile = await StorageFile.GetFileFromPathAsync(Convert.ToString(lstPlayList.SelectedValue.ToString()));
var mediaStream = await mediaFile.OpenAsync(Windows.Storage.FileAccessMode.Read);
PlayerME2.SetSource(mediaStream, mediaFile.FileType);
}
Whats wrong with this code? I m trying to play a media file when the selection changed from the list box. but Getting the error
An exception of type 'System.UnauthorizedAccessException' occurred in mscorlib.dll but was not handled in user code
I was set the admin privillage too.
<requestedExecutionLevel level="requireAdministrator" uiAccess="true" />
i am getting the error as:
An exception of type 'System.UnauthorizedAccessException' occurred in mscorlib.dll but was not handled in user code
WinRT information: Cannot access the specified file or folder (占퀠0). The item is not in a location that the application has access to (including application data folders, folders that are accessible via capabilities, and persisted items in the StorageApplicationPermissions lists). Verify that the file is not marked with system or hidden file attributes.
Additional information: Access is denied.
If there is a handler for this exception, the program may be safely continued.
anything else i missed?