FAQ: Why am I getting “access denied” during recording?


If you are using recording feature of Coded UI Test or Fast Forward feature of Microsoft Test Manager (MTM) and getting the following error –

The last action was not recorded because access to the application was denied

there could be two reasons for this –

  1. The application under test (one that you are trying to record) has higher privileges then the Visual Studio or Microsoft Test Manager process.  In this case, this is deliberate (a.k.a. by design) to prevent any security issue.
  2. You are running this on a VM with dynamic disk.  This is bug in the current release.
Comments (5)

  1. Prabhat says:

    Gautam,

    Is this resolved yet? I am running it on a physical machine with dynamic disk. I have the exact same problem.

    Regards,

    Prabhat

  2. gautamg says:

    @Prabhat – This is resolved in the next major release but not in VS 2010.

  3. I recently had an issue where I was unable to record interactions with MSIExec installers using the Coded-UI recorder.  It would produce the "The last action was not recorded because access to the application was denied" error.  I was able to resolve this by installing KB2403277 @ archive.msdn.microsoft.com/KB2403277

  4. gautamg says:

    @Paul – I don't think the KB you are mentioning has anything to do with this.  In your case the error earlier was probably genuine because Coded UI Test Builder was not running with admin priviledge and setup was running as admin.

    Something has changed in your scenario above to fix the issue.

  5. @Gautam – I actually tested this on a fresh install of Visual Studio.  Initially recording actions against the installer window would produce the "The last action was not recorded because access to the application was denied" error.  I then disabled UAC and rebooted but this behavior continued.  After installing KB2403277 and rebooting I was able to successfully interact with the window.  Perhaps it has to do with the following fix addressed by the KB "You cannot load Microsoft Visual C++ version 2.0 DLL files into Coded UI Tests (Cuit.exe)."  Then again it could be something else which is not described.  I did not execute the Visual Studio, or the test builder as admin at any point.  I appreciate your reply.