Azure Emulators, Encrypted Folders, and App Pools, Oh My!

A couple of weeks ago a colleague of mine, Alex Culp, pinged me on IM. He was preparing to lead a Windows Azure Boot Camp in Austin, TX and was having trouble getting his Azure demos any websites to run in his local emulator. Below is a screenshot of the error he would receive any time he ran a brand new Windows Azure project with a web role (regardless of if the web role was MVC or Web Forms):


Here’s just a sample of what we tried to resolve the problem:

  • Restart the emulators
  • Reboot the machine
  • Re-install the Windows Azure tools for Visual Studio
  • Running iisreset
  • Running aspnet_regiis
  • Running dsinit

Of course none of those things worked.

Luckily for him, he was able to work it out later that night. Here’s an excerpt from an email he sent me detailing the cause of the problem:

…Because I am in consulting I keep all of my customer source code in an encrypted folder. Because the application pool is running under NETWORK SERVICE it does not have permissions to decrypt the files it needs to run.

Moral of the story? Your websites should probably not be running in encrypted folders, unless you want their app pools to run with an account with elevated privileges (something I would not recommend).