Was googling but didn't find the pointer to this exactly solution to the problem happened to me.
Having two virtual dirs with absolutely same setup and config, one was returning Http 400 and not even going to Application_BeginRequest, another was working just alright.
Virtual dirs were created at the different time. One I believe before the .NET 3.5 install and one after.
Anyway, just deleting the virtual directory and recreating it solved my problem.
No time to analyse metabase diffs etc, evening is late and release is close :).