Resolving ASP.NET 4.0 has not been Registered on the Web Server Error

While creating an ASP.NET Website in IIS 7 in Visual Studio 2008/2010, you may get the following error:

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.

Will you give this article a +1 ? Thanks in advance

About The Author

Suprotim Agarwal
Suprotim Agarwal, ASP.NET Architecture MVP (Microsoft Most Valuable Professional) works as an Architect Consultant and provides consultancy on how to design and develop Web applications.

Suprotim is also the founder and primary contributor to DevCurry, DotNetCurry and SQLServerCurry. He is the Editor of a Developer Magazine called DNC Magazine. He has also written two EBooks 51 Recipes using jQuery with ASP.NET Controls. and The Absolutely Awesome jQuery CookBook

Follow him on twitter @suprotimagarwal


Mufto said...

Thank you for these posts you share. I am addicted to your blog ;)

Mark said...

open a command prompt "as administrator", move to the directory C:\Windows\Microsoft.NET\Framework\v4.0.30319 , execute aspnet_regiis -i .

Jesse B. said...

Thanks for the tip, I learned a thing or two, but actually this worked for me

C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -ir

C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -ir

and I keep forgetting it since earlier versions.

Matt B said...

The following command worked for me as well:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i

Thank you to those posting this information!

Anonymous said...

Thanks. sorted my 4.0 message.

Anonymous said...

This solved the problem.

C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis -i

Anonymous said...

Thank you for resolving this problem

Anonymous said...

Thank you!! :-)

Found this page through google but I'm noticing all the tutorials and other great info; I will be back!

Anonymous said...

Hi i found this late
Windows 8 doesn't support aspnet_regiis.exe -i and i'm having this problem that visual studio 2012 doesn't load iis websites not sufficient privileges

How can i solve it?

Parthi said...

Thanks for your information....

Unknown said...


Yogesh Gupta said...

Thanks, it helped me

Praveen Pandey said...

It helped me resolve the ASP.Net issue. Thanks

eswara suresh said...

every blog mentioning try run the command aspnet_regiis -i...... which is not really work in windows 8..... these steps helped me in finding the solution to my problem.... thanks for you help.

John Harper said...

An issue withing the server may be the problem here. As far I know, according to what I have ( ), updates are always required.

Navin Rane said...

HI Suprotim,
I tried step 1 & 3 but still at time of loading project i get the error.
i ma using VS 2013.
Could you please help me out.

asim mehmood said...

Thank you very much