This error will occur with SQL Server 2005 on some 64-bit versions of Windows.
How to resolve it:
Go to Control Panel>Programs (or Programs and Features)>Turn Windows features on or off
Select the following items circled in red. Other items will auto-select as a result:
Click OK and wait for installation to complete.
Go to an elevated command prompt and do the following commands in order:
cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1
Now you can reinstall SQL Server 2005 and you should not receive the ASP.NET error anymore.