locked
Getting Access Denied error when try to deploy metro app from VS 11 Beta

    Question

  • Hi,

    When I try to deploy metro style app from VS11 Beta, i'm getting following error.

    Error : DEP0740 : Access denied. This may be because the application state is locked. A possible cause is "RuntimeBroker.exe" retaining a lock on the storage data for your application. The workarounds are (1) Wait for the "RuntimeBroker.exe" to quit. This may take up to 6 minutes. (2) Kill the "RuntimeBroker.exe" process and redeploy. (Note that option (2) may cause loss of data.) 

    Error 2 Opening file from location: F:\...bin\Debug\AppX\AppxManifest.xml failed with error code: 0x80070005. Access is denied.
     

    Any idea, why?


    CAT

    Wednesday, March 14, 2012 10:44 PM

Answers

All replies

  • Hello,

    are the project files encrypted out of curiosity?   In explorer, the filename is green in color or you can right click on the file and select properties, in the general tab, attributes section, click on advanced, checkbox "Encrypt contents to secure data"

    Does this reproduce consistently?

    thanks!

    mike

    Wednesday, March 14, 2012 11:20 PM
    Moderator
  • Project files are not encrypted.

    "Encrypt contents to secure data" is not checked, it worked few times and seeing this issue consistently.


    CAT

    Wednesday, March 14, 2012 11:37 PM
  • Copied whole project to My Documents folder and rebuild, issue is gone. Strange!

    CAT


    Thursday, March 15, 2012 12:06 AM
  • This worked for me as well, but is only a temporary solution since it's outside the directory structure for my git repository.  There needs to be a quick answer for those of us who have an existing project hierarchy where the Metro project is only one component.  As it is, I'm going to have to install some kind of folder sync tool to make sure the files exist where they need to be.
    Monday, April 09, 2012 1:47 PM
  • I ran into the same problems It appears to be a permission problem on the directory. For some reason my git clone doesn't set the properties properly so that Visual Studio Express 11 Beta can execute on the folder. While this isn't recommended, I gave "Everyone" Full control to the directory.
    Wednesday, April 11, 2012 10:46 PM
  • The proper solution is to give the SYSTEM account full access to the top level directory containing your project. You can do this by right clicking on the directory in Windows Explorer > Properties menu > Security Tab > Edit button > Add button > type SYSTEM in the edit field > Check Names button > OK button on all remaining dialogs.
    • Proposed as answer by Boourns Thursday, April 19, 2012 12:09 AM
    • Unproposed as answer by Boourns Thursday, April 19, 2012 12:09 AM
    • Proposed as answer by Boourns Thursday, April 19, 2012 12:09 AM
    Thursday, April 19, 2012 12:09 AM
  • Thank you, this worked for me.  Now the project can live where it belongs.
    Thursday, April 19, 2012 1:30 PM
  • Hi

    I am facing same problem.Even i have copied project in My Document folder but no luck.

    varsf = awaitPackage.Current.InstalledLocation.GetFileAsync(@"ContactXML.xml");

    XmlDocumentxmlDoc;

    using(varstream = awaitsf.OpenAsync(FileAccessMode.ReadWrite)).

    Access denied issue.

    Thursday, July 19, 2012 10:01 AM

  • That's a different error.  You can't open files for read/write in the package install location, you can only read.  If you need to write, you will first have to copy the file to local storage, (Windows.Storage.ApplicationData.Current.LocalFolder, etc.)

    • Edited by Anatoly_LP Thursday, July 19, 2012 1:12 PM
    Thursday, July 19, 2012 1:11 PM
  • Hello,

    are the project files encrypted out of curiosity?   In explorer, the filename is green in color or you can right click on the file and select properties, in the general tab, attributes section, click on advanced, checkbox "Encrypt contents to secure data"

    Does this reproduce consistently?

    thanks!

    mike

    That worked for me.  I am using EFS.  Thanks :)
    Sunday, March 08, 2015 10:05 PM