locked
Debugging Metro application results in Access Denied

    Question

  • I am trying to launch a metro application from visual studio.  When the application launches i am greeted with an error stating "Unable to activate Windows Tailored application" ... "Access Denied".

    I tried with a C++ and C# project.  I also tried launching into the emulator (which i later found out is just a rdp connection to the same machine) with the same result.

    I am developing on a Parallels VM.  I do have the proper graphics and parallels drivers installed.

    Any ideas?

    Monday, September 19, 2011 3:14 PM

All replies

  • Hello,

     

    after you press F5 or start debugging, does the output window (Show output from: build) did the deploy succeed?  Also, are you able to launch the application successfully without the debugger Ctrl+F5 (start without debugging)? 

     

    much appreciated,

    mike wong

    Microsoft Developer Support

    Tuesday, September 20, 2011 12:51 AM
    Moderator
  • Hey Mike,

    Thanks for the help.  This happens when i start with or without debugging.  Also, it doesn't matter if i'm local debugger or the simulator debugger.

    Here is the error message and below is the debugger output (i highlighted in bold what i think is generating the messagebox) -

    'TestApplication.exe' (Win32): Loaded 'C:\Users\Administrator\AppxLayouts\98887da8-1b3a-4432-a224-89db8618f6a6VS.Release.Win32.Administrator\TestApplication.exe'. Symbols loaded.
    'TestApplication.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntdll.dll'. Cannot find or open the PDB file.
    'TestApplication.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel32.dll'. Cannot find or open the PDB file.
    'TestApplication.exe' (Win32): Loaded 'C:\Windows\SysWOW64\KernelBase.dll'. Cannot find or open the PDB file.
    'TestApplication.exe' (Win32): Loaded 'C:\Program Files\Applications\microsoft.vclibs.110_11.0.0.0_x86_neutral_8wekyb3d8bbwe\vccorlib110.dll'. Cannot find or open the PDB file.
    'TestApplication.exe' (Win32): Loaded 'C:\Windows\SysWOW64\combase.dll'. Cannot find or open the PDB file.
    'TestApplication.exe' (Win32): Loaded 'C:\Program Files\Applications\microsoft.vclibs.110_11.0.0.0_x86_neutral_8wekyb3d8bbwe\msvcp110.dll'. Cannot find or open the PDB file.
    'TestApplication.exe' (Win32): Loaded 'C:\Program Files\Applications\microsoft.vclibs.110_11.0.0.0_x86_neutral_8wekyb3d8bbwe\msvcr110.dll'. Cannot find or open the PDB file.
    'TestApplication.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ole32.dll'. Cannot find or open the PDB file.
    'TestApplication.exe' (Win32): Loaded 'C:\Windows\SysWOW64\user32.dll'. Cannot find or open the PDB file.
    'TestApplication.exe' (Win32): Loaded 'C:\Windows\SysWOW64\shell32.dll'. Cannot find or open the PDB file.
    'TestApplication.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcrt.dll'. Cannot find or open the PDB file.
    'TestApplication.exe' (Win32): Loaded 'C:\Windows\SysWOW64\rpcrt4.dll'. Cannot find or open the PDB file.
    'TestApplication.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sechost.dll'. Cannot find or open the PDB file.
    'TestApplication.exe' (Win32): Loaded 'C:\Windows\SysWOW64\gdi32.dll'. Cannot find or open the PDB file.
    'TestApplication.exe' (Win32): Loaded 'C:\Windows\SysWOW64\shlwapi.dll'. Cannot find or open the PDB file.
    'TestApplication.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sspicli.dll'. Cannot find or open the PDB file.
    'TestApplication.exe' (Win32): Loaded 'C:\Windows\SysWOW64\lpk.dll'. Cannot find or open the PDB file.
    'TestApplication.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cryptbase.dll'. Cannot find or open the PDB file.
    'TestApplication.exe' (Win32): Loaded 'C:\Windows\SysWOW64\usp10.dll'. Cannot find or open the PDB file.
    'TestApplication.exe' (Win32): Loaded 'C:\Windows\SysWOW64\imm32.dll'. Cannot find or open the PDB file.
    'TestApplication.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msctf.dll'. Cannot find or open the PDB file.
    'TestApplication.exe' (Win32): Loaded 'C:\Windows\SysWOW64\bcryptprimitives.dll'. Cannot find or open the PDB file.
    'TestApplication.exe' (Win32): Loaded 'C:\Windows\SysWOW64\SHCore.dll'. Cannot find or open the PDB file.
    'TestApplication.exe' (Win32): Loaded 'C:\Windows\SysWOW64\Windows.UI.Xaml.dll'. Cannot find or open the PDB file.
    'TestApplication.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ninput.dll'. Cannot find or open the PDB file.
    'TestApplication.exe' (Win32): Loaded 'C:\Windows\SysWOW64\advapi32.dll'. Cannot find or open the PDB file.
    'TestApplication.exe' (Win32): Loaded 'C:\Windows\SysWOW64\oleaut32.dll'. Cannot find or open the PDB file.
    'TestApplication.exe' (Win32): Loaded 'C:\Windows\SysWOW64\winmm.dll'. Cannot find or open the PDB file.
    'TestApplication.exe' (Win32): Loaded 'C:\Windows\SysWOW64\wininet.dll'. Cannot find or open the PDB file.
    'TestApplication.exe' (Win32): Loaded 'C:\Windows\SysWOW64\urlmon.dll'. Cannot find or open the PDB file.
    'TestApplication.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msimg32.dll'. Cannot find or open the PDB file.
    'TestApplication.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ws2_32.dll'. Cannot find or open the PDB file.
    'TestApplication.exe' (Win32): Loaded 'C:\Windows\SysWOW64\IPHLPAPI.DLL'. Cannot find or open the PDB file.
    'TestApplication.exe' (Win32): Loaded 'C:\Windows\SysWOW64\d3d11.dll'. Cannot find or open the PDB file.
    'TestApplication.exe' (Win32): Loaded 'C:\Windows\SysWOW64\uxtheme.dll'. Cannot find or open the PDB file.
    'TestApplication.exe' (Win32): Loaded 'C:\Windows\SysWOW64\UIAutomationCore.dll'. Cannot find or open the PDB file.
    'TestApplication.exe' (Win32): Loaded 'C:\Windows\SysWOW64\slc.dll'. Cannot find or open the PDB file.
    'TestApplication.exe' (Win32): Loaded 'C:\Windows\SysWOW64\winmmbase.dll'. Cannot find or open the PDB file.
    'TestApplication.exe' (Win32): Loaded 'C:\Windows\SysWOW64\normaliz.dll'. Cannot find or open the PDB file.
    'TestApplication.exe' (Win32): Loaded 'C:\Windows\SysWOW64\iertutil.dll'. Cannot find or open the PDB file.
    'TestApplication.exe' (Win32): Loaded 'C:\Windows\SysWOW64\nsi.dll'. Cannot find or open the PDB file.
    'TestApplication.exe' (Win32): Loaded 'C:\Windows\SysWOW64\winnsi.dll'. Cannot find or open the PDB file.
    'TestApplication.exe' (Win32): Loaded 'C:\Windows\SysWOW64\twinapi.dll'. Cannot find or open the PDB file.
    'TestApplication.exe' (Win32): Loaded 'C:\Windows\SysWOW64\WinTypes.dll'. Cannot find or open the PDB file.
    The thread 0xaa4 has exited with code 0 (0x0).
    'TestApplication.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cryptsp.dll'. Cannot find or open the PDB file.
    'TestApplication.exe' (Win32): Loaded 'C:\Windows\SysWOW64\rsaenh.dll'. Cannot find or open the PDB file.
    'TestApplication.exe' (Win32): Loaded 'C:\Windows\SysWOW64\actxprxy.dll'. Cannot find or open the PDB file.
    'TestApplication.exe' (Win32): Loaded 'C:\Windows\SysWOW64\Windows.UI.Immersive.dll'. Cannot find or open the PDB file.
    'TestApplication.exe' (Win32): Loaded 'C:\Windows\SysWOW64\dui70.dll'. Cannot find or open the PDB file.
    First-chance exception at 0x7660070C (KernelBase.dll) in TestApplication.exe: 0x80070005: Access is denied.
    First-chance exception at 0x7660070C (KernelBase.dll) in TestApplication.exe: 0x80070005: Access is denied.
    First-chance exception at 0x7660070C (KernelBase.dll) in TestApplication.exe: 0x80070005: Access is denied.
    'TestApplication.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\dui70.dll'
    'TestApplication.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\Windows.UI.Immersive.dll'
    'TestApplication.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\actxprxy.dll'
    'TestApplication.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\WinTypes.dll'
    'TestApplication.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\twinapi.dll'
    'TestApplication.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\slc.dll'
    'TestApplication.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\uxtheme.dll'
    'TestApplication.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\d3d11.dll'
    'TestApplication.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\IPHLPAPI.DLL'
    'TestApplication.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\winnsi.dll'
    'TestApplication.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\nsi.dll'
    'TestApplication.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\ws2_32.dll'
    'TestApplication.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\msimg32.dll'
    'TestApplication.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\wininet.dll'
    'TestApplication.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\urlmon.dll'
    'TestApplication.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\oleaut32.dll'
    'TestApplication.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\normaliz.dll'
    'TestApplication.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\winmm.dll'
    'TestApplication.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\winmmbase.dll'
    'TestApplication.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\ninput.dll'
    'TestApplication.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\Windows.UI.Xaml.dll'
    The thread 0xf60 has exited with code 2 (0x2).
    The thread 0x35c has exited with code 2 (0x2).
    The thread 0x768 has exited with code 2 (0x2).
    The program '[1176] TestApplication.exe' has exited with code 2 (0x2).

    Tuesday, September 20, 2011 1:49 AM
  • Hello,

     

    I appreciate the fast reply.  So right after the debugger tries to load the symbols for dui70.dll above, it should try to load the symbols for c:\windows\sysWow64\dwmapi.dll, dwrite.dll, dxgi.dll, etc. I wonder if there is a permissions issue on dwmapi.dll for some reason. (it looks in the dll at the debug directories section to see what the pdb file is named, guid, etc...)

    let's try something like this:

    Download Process monitor from

    http://technet.microsoft.com/en-us/sysinternals/bb896645

    Unzip and start procmon.  on the toolbar, turn off everything but show file activity  e.g. turn off Show registry activity, network activity, process and thread activity, profiling events.

    Start debugging testapplication.exe.  once you get the error go back to procmon and turn off capture events (File | Capture Events)

    Do a search (Edit | Find...) for dui70.dll in procmon.  We should see an entry like QueryNameInfo for dui70.dll and then some entries later, one for dwmapi.dll.  Do you see any access denied under the result column between the two rows?

    much appreciated,

    mike

     

    Tuesday, September 20, 2011 6:06 PM
    Moderator
  • I couldn't see anything weird after 'dui70.dll'.  But honestly, i can't really make heads or tails of what is going on in the log.  I do see a bunch of rows where the result is either "BUFFER OVERFLOW" or "FILE LOCKED WITH ONLY READERS".

     

    I also did a filter on KernelBase.dll.mui (because I saw that in the output window showing "Access Denied") and there are errors with kernel32.dll and kernelbase.dll stating "BUFFER OVERFLOW" and "FILE LOCKED WITH ONLY READERS".

     

    I do have the log file zipped up (5.8mb) if you would like to take a look.  I was able to get windows 8 installed on my hp laptop so i'm assuming that this is an issue with parallels or just a general vm issue.

     

    Let me know if i can help any further.

    Tuesday, September 20, 2011 11:34 PM
  • Hello,

     

    most definitely,  send the log file to mikewong@microsoft.com  take out the nospam. 

     

    much appreciated,

    mike

    Tuesday, September 20, 2011 11:46 PM
    Moderator
  • Okay Mike.  I just sent it.  Let me know if you haven't received it.  Also, let me know if you would like me to try anything else.

     

    Thanks,

    Wednesday, September 21, 2011 12:09 AM
  • Hi,

     

    not sure if you saw my email to you last week -

    Do the access denied exceptions happen with any metro C++ application?  Specifically, if you go to file new project, Visual C++, Windows metro style, Application, build and debug,  Are you able to debug at all?

    If you go to solution explorer, double click on the package.appxmanifest, capabilities tab, if you check mark specific capabilities, then build and debug, does that make any difference?

    Another technique is for us to see what functions are throwing the access denied, to do this go to Debug | Exceptions

    Check C++ Exceptions, Common Language Exceptions, Native Run-Time Checks, and Win32 Exceptions.  Start debugging, Does it break into the debugger on the access denied errors?  If so, choose break on the dialog, go to debug | Save dump, make sure save as type is set to minidump with heap, pick a location, and select save.  The dump file will be too large to send via email so I will need to send you an upload location depending on the above questions.

    Thanks again for the patience and cooperation,

    mike

    Tuesday, September 27, 2011 6:04 PM
    Moderator
  • Hi Mike,

    I have also been running into exactly the same problem as mentioned on this thread.

    I tried the suggested solutions and got nowhere. Was a solution to this problem found?

     

    As far as the questions asked above are concerned.

    Do the access denied exceptions happen with any metro C++ application? Specifically, if you go to file new project, Visual C++, Windows metro style, Application, build and debug, Are you able to debug at all?

    Am unable to debug any app with visual studio (same message)

    If you go to solution explorer, double click on the package.appxmanifest, capabilities tab, if you check mark specific capabilities, then build and debug, does that make any difference?

    Changing capabilities does not make a difference.

    Another technique is for us to see what functions are throwing the access denied, to do this go to Debug | Exceptions

    Check C++ Exceptions, Common Language Exceptions, Native Run-Time Checks, and Win32 Exceptions. Start debugging, Does it break into the debugger on the access denied errors? If so, choose break on the dialog, go to debug | Save dump, make sure save as type is set to minidump with heap, pick a location, and select save. The dump file will be too large to send via email so I will need to send you an upload location depending on the above questions.

     I don't think Visual Studio Express editions have the "Save dump"  options it's only on Pro/Ultimate editions and Windows 8 dev preview comes with the express edition pre-installed. The exceptions seen are

    First-chance exception at 0x76A3070C (KernelBase.dll) in MSTestExecutor.Appx.exe: 0x80070005: Access is denied.

     First-chance exception at 0x76A3070C (KernelBase.dll) in MSTestExecutor.Appx.exe: 0x80070005: Access is denied.

     First-chance exception at 0x76A3070C (KernelBase.dll) in MSTestExecutor.Appx.exe: 0x80070005: Access is denied.

     

    Thanks,

    Rohan

    Friday, October 14, 2011 7:07 PM
  • Hi Rohan,

    so the last mail I had to A. Carter was the following:

    This is because we are running from the Express edition of Visual Studio.  Did you happen to install the full edition of Visual Studio?  (http://msdn.microsoft.com/en-us/vstudio/hh127353 - Visual Studio 11 Developer Preview)  If not, then we can collect the dump via the alternate method:

    When you break in the Visual Studio debugger because of the access denied exception, go to task manager, details tab.  Find your application e.g. application1.exe, right click on it, and select create dump file.  There will be a dialog that tells you where Windows saved the file e.g. c:\users\mikewong\appdata\local\temp\applicationname.dmp

    zip up the dump and email me mikewong at microsoft.com and I will reply with an upload location.

    Since you might be getting multiple Access denied go back to the debugger and press F5 to continue debugging.  If you break again, we might want to collect another dump to see if we are getting access denieds for multiple reasons.

    It would be hugely appreciated if you can generate some dumps Rohan especially in the case of a blank application (File | New Project)

    thanks!
    mike

    Tuesday, October 18, 2011 4:35 PM
    Moderator
  • Hello Mike,

    Any update about this issue ? I'm getting the very same problem here.

    edit: This problem was caused by the usage of a secondary monitor. Unplugging it, setting the display mode as only on the second monitor or setting the display mode to mirroring resolved this issue.
    • Edited by jf.michel Friday, December 02, 2011 5:51 PM answer found
    Friday, December 02, 2011 2:11 PM