This has caught me out often enough that I should blog about it.
If you are working with a web role in Windows Azure your web project is copied into the bin directory of your cloud project and is ran from there. This allows the Windows Azure Development environment to simulate running within the cloud.
If you need to therefore modify a web.config setting then modifying your web.config on the fly from your source file won’t make the slightest bit of difference.
You need to either modify the web.config in the bin directory of your cloud project, or stop and re-run your role again.
In my case, I was messing with the maxRequestLength attribute of the httpRuntime element.