After creating an ASP.NET web application in Visual Studio, to host it in a freshly installed IIS 7.5, you need to do two things that are not immediately obvious:
- Create a new app pool or change the default app pool to target .NET 4 (see IIS->Application Pools).
- Run this from the command line:
MSDN has more info on aspnet_regiis command line options here.
Just putting this on my blog so I can remember this magic command line.