Tonight I moved moved an ASP.NET site from IIS6 to IIS7. Things seemed broken pretty badly at first, and I wondered if I was making a mistake to leave the comfort of IIS6. However, it turned out to be minor changes to the web.config. I'm sure they're already well known and well documented, but I figured I would scribble them down in case I ever need to do it again.
1. Remove the built-in Membership, Role and Profile providers
If you are configuring your own Membership, Role or Profile providers with your own database connection string, make sure you remove the built-in ones.or you may get an exception about not being able to connect to "LocalSqlServer". Which is the connection string used in machine.config for the stock providers. This did not happen under IIS6. So it turns out the bolded lines become very important under IIS7.
2. Move your Modules and Handlers to the <system.webServer> section
This one took me a while to figure out, but it shouldn't have. I had a custom module that was redirecting to secure pages when necessary, and it was not firing under IIS7. So I instrumented it up with log statements, and still nothing. Hmm. A quick search turned up Rick Strahl's post on this.
MODULES DON'T GO HERE ANYMORE
HANDLERS DON'T GO HERE ANYMORE
FOR IIS7, MODULES GO HERE NOW
FOR IIS7 HANDLERS GO HERE NOW