Magic command to install Asp.Net 4 for IIS 7.5
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:
%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i
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.