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

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

  • quarta-feira, 14 de março de 2012 22:44
     
     

    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

Todas as Respostas

  • quarta-feira, 14 de março de 2012 23:20
    Moderador
     
     

    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

  • quarta-feira, 14 de março de 2012 23:37
     
     

    Project files are not encrypted.

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


    CAT

  • quinta-feira, 15 de março de 2012 00:06
     
     Respondido
    Copied whole project to My Documents folder and rebuild, issue is gone. Strange!

    CAT


    • Editado Snekethan quinta-feira, 15 de março de 2012 00:38
    • Marcado como Resposta Vicky SongModerator segunda-feira, 19 de março de 2012 09:42
    •  
  • segunda-feira, 9 de abril de 2012 13:47
     
     
    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.
  • quarta-feira, 11 de abril de 2012 22:46
     
     
    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.
  • quinta-feira, 19 de abril de 2012 00:09
     
     Resposta Proposta
    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.
    • Sugerido como Resposta Boourns quinta-feira, 19 de abril de 2012 00:09
    • Não Sugerido como Resposta Boourns quinta-feira, 19 de abril de 2012 00:09
    • Sugerido como Resposta Boourns quinta-feira, 19 de abril de 2012 00:09
    •  
  • quinta-feira, 19 de abril de 2012 13:30
     
     
    Thank you, this worked for me.  Now the project can live where it belongs.
  • quinta-feira, 19 de julho de 2012 10:01
     
     

    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.

  • quinta-feira, 19 de julho de 2012 13:11
     
     

    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.)

    • Editado Anatoly_LP quinta-feira, 19 de julho de 2012 13:12
    •