CreateFolderAsync within LocalFolder yields AccessDeniedException (new to build 8400) RRS feed

  • Question

  • I have code that does this:

    ApplicationModel::Package^ package = ApplicationModel::Package::Current;
    Storage::StorageFolder^ installedLocation = package->InstalledLocation;
    Concurrency::task<Storage::StorageFolder^> createFolder(installedLocation->CreateFolderAsync(subFolderName));
    	Storage::StorageFolder^ result = createFolder.get ();

    This worked when I was on build 8250, but now that we have moved to 8400 I get a "Microsoft C++ exception: Platform::AccessDeniedException ^"

    Was it a bug when it work, or a bug now that it is failing?

    Regards, Guy

    Tuesday, June 5, 2012 9:15 PM


  • Hi Guy,

    Your app doesn't have write access to its installed location, so this should never have worked.

    Instead you should save to the application data folders. See Application data and the Application data sample for more information on those locations.


    • Marked as answer by gnichola Tuesday, June 5, 2012 9:48 PM
    Tuesday, June 5, 2012 9:44 PM