To resolve this problem, ASP.NET must be registered in IIS. To do this, use the ASP.NET IIS Registration tool. The following syntax will install the version of ASP.NET that is associated with Aspnet_regiis.exe and only register ASP.NET in IIS.
aspnet_regiis -ir
Make sure that you are running this command from the install directory of the version of ASP.NET that needs to be registered in IIS. For example, run aspnet_regiis -ir from %windir%\inetpub\wwwroot\aspnet_client\system_web\2_0_50727 if ASP.NET 2.0 needs to be registered in IIS.