locked
Playlist.LoadAsync unauthorized access exception RRS feed

  • Question

  • Hi

    I am attempting to load a playlist present on the users computer (format is supported).

    However, regardless of the playlist's location, I get an unauthorized access exception.

    I've added pretty much all the capabilities to the project that have to do with handling playlists and media files in general. It made no changes whatsoever.

    It is also irrelevant of the playlist's location (I haven't tried to store the playlist in app data folders, though), but the exception is thrown if the playlists is inside the music or video libraries.

    So, any clue as why this is happening? Is this a bug? Do I have to write my own playlist decoding engine? thanks.

    Using windows 8.1 and VS 2013 RC

    Friday, October 18, 2013 7:05 PM

Answers

  • Hi Mcosmin,

    Do you know where the tracks the playlist refers to are? This sounds like a known problem where the playlist will fail if any of its tracks are not accessible.

    There isn't a workaround short of implementing your own playlist code.

    --Rob

    • Marked as answer by mcosmin Wednesday, October 30, 2013 7:10 AM
    Tuesday, October 29, 2013 11:35 PM
    Moderator
  • You are probably right. The files in the playlist are on the desktop.

    I ended up removing the ability to read playlists not created by the application. If it is created by the application it means it will only have files to can reach.

    • Marked as answer by mcosmin Wednesday, October 30, 2013 7:10 AM
    Wednesday, October 30, 2013 7:10 AM

All replies

  • How are you getting the StorageFile? Do you get unauthorized access from the StorageFile itself or only from the PlayList class?

    --Rob

    Friday, October 18, 2013 7:29 PM
    Moderator
  • I get the storagefile from KnowFolders.Playlists.GetFilesAsync() method.

    It appears the Playlist.LoadAsync() method is throwing the exception. I tried opening a stream on the same file and it appeared to have worked properly (I can read its file properties).


    • Edited by mcosmin Saturday, October 19, 2013 8:11 AM
    Saturday, October 19, 2013 8:11 AM
  • Hi Mcosmin,

    Do you know where the tracks the playlist refers to are? This sounds like a known problem where the playlist will fail if any of its tracks are not accessible.

    There isn't a workaround short of implementing your own playlist code.

    --Rob

    • Marked as answer by mcosmin Wednesday, October 30, 2013 7:10 AM
    Tuesday, October 29, 2013 11:35 PM
    Moderator
  • You are probably right. The files in the playlist are on the desktop.

    I ended up removing the ability to read playlists not created by the application. If it is created by the application it means it will only have files to can reach.

    • Marked as answer by mcosmin Wednesday, October 30, 2013 7:10 AM
    Wednesday, October 30, 2013 7:10 AM