I am trying to deploy a test web app on Azure, but when I run the Azure emulator on my local machine I get this error from the Azure emulator console attached to my WebRole:
In Azure WebRoles, by default (in Full IIS Mode) the RoleEntryPoint gets walled off from the rest of the WebRole, and runs in a different process.
A side effect of this is that your RoleEntryPoint will not have access to your web.config.
Azure SDK 1.3 -1.7 will look in WaIISHost.exe.config
Azure SDK 1.8+ will look in the WebRoleProjectName.dll.config.
With the newest change to the SDK, you should be able to place an app.config in your project and your role entry point should then have access to it.
You can read more about this in this Microsoft blog post or in this Stackoverflow post