Before installing the .NET Framework 3.5 (which is needed if you are
running ASP.NET 3.5 applications), users must perform the following two
steps to enable ASP.NET applications:

Each IIS 7.0 application pool that runs an ASP.NET application must
be explicitly configured using the .NET Framework version that matches
the version of ASP.NET used for the application. You can only run one
version of ASP.NET per application pool, so you must use separate
application pools for each ASP.NET version.

In the IIS Manager console, open Application Pools, then right-click
an application pool and select Basic Settings. In the Edit Application
Pool dialog box, select the .NET Framework version
that matches the applications configured in the application pool, then
click OK.

Note: If you installed a new .NET Framework version, you will see need to create a new application pool (it is above the "Sites" folder and right below the name of your computer in the IIS console.