This sucks :-(
I was deploying a new ASP.NET 3.5 application to our web servers this afternoon, which uses the AjaxControlToolkit. As part of this the web.config included a 'remove name="ScriptModule"' in the httpModules section. However there was no httpModule called ScriptModule in the parent web.config. When I fired up the application it threw a YSOD immediately. It seems that if you try to remove an entry that doesn't exist, the compiler throws an exception. This seems a little bonkers to me - if you're trying to remove an entry, why should it matter that it doesn't exist? It's easy to fix, obviously, just a bit annoying and I don't see what purpose it serves...