When making an ASP.NET website throughout IIS 7 in Visual Studio 2008/2010, you can find the following issue:
“ASP.NET 4.0 has not been registered on the Web server. You need to manually configure your Web server for ASP.NET 4.0 in order for your site to run correctly, Press F1 for more details”
This error usually occurs if you have installed IIS 7.x ‘after’ installing .NET. In order to resolve the error, do the following:
Step 1: Open Control Panel > Programs > Turn Windows Features on or off > Internet Information Services > World Wide Web Services > Application development Feature
Check the box 'ASP.NET' . Also in the Web Management Tools, remember to select IIS 6 Management Compatibility and IIS Metabase as shown below.
Note: Make sure that you are running Visual Studio 2010 as Administrator.
Now run the site from Visual Studio 2010 using Ctrl + F5.
Step 2: If you further get the error “Handler "PageHandlerFactory-Integrated" has a bad module "ManagedPipelineHandler" in its module list” or Managed handler is used; however, ASP.NET is not installed or is not installed completely then do a Visual Studio 2010 repair.
Start > Programs > Accessories > Run. Type this command depending on the version of VS 2010 installed.
Silent Repair for 32-bit
%windir%\Microsoft.NET\Framework\v4.0.30319\SetupCache\Client\setup.exe /repair /x86 /x64 /ia64 /parameterfolder Client /q /norestart
Silent Repair for 64-bit
%windir%\Microsoft.NET\Framework64\v4.0.30319\SetupCache\Client\setup.exe /repair /x86 /x64 /ia64 /parameterfolder Client /q /norestart
That’s it. Restart IIS and the errors should be fixed.
Step 3: If the errors are not yet fixed, there could be an issue in the Application Pool. Follow these steps
1. Open IIS Manager (Run > Inetmgr) . Expand the server node and then click Application Pools
2. Now select the application pool that contains the application that you want to change. Go to Actions > View Applications.
3. Select the Application pool to change > In Action Pane, click on ‘Change Application Pool’
4. In the ‘Select Application Pool’ dialog box, select the application pool associated with .NET 4.0 from the Application pool list and then click OK.
Best ASP.NET Hosting Recommendation
ASPHostPortal.com provides its customers with Plesk Panel, one of the most popular and stable control panels for Windows hosting, as free. You could also see the latest .NET framework, a crazy amount of functionality as well as Large disk space, bandwidth, MSSQL databases and more. All those give people the convenience to build up a powerful site in Windows server. ASPHostPortal.com offers ASP.NET hosting starts from $1/month only. They also guarantees 30 days money back and guarantee 99.9% uptime. If you need a reliable affordable ASP.NET Hosting, ASPHostPortal.com should be your best choice.