Asp.net 4.0 has not been registered
Asked Answered
T

13

199

When I try to open my Visual Studio project I get the following error:

Asp.Net has not been registered on the webserver you need to manually configure your webserver for Asp.net 4.0.


Update:
Nevermind I fixed it:

I just repaired .Net Framework 4.0 and the issue was resolved.

Thesda answered 29/4, 2011 at 19:1 Comment(3)
This is usually from adding IIS as a feature after you have completed your .NET framework or Visual Studio installs. If you do it first, it seems to be OK on Win 7.Fast
"I just repaired .Net Framework 4.0" - how?Alf
I repaired it using the Microsoft .NET Framework Repair Tool at microsoft.com/en-us/download/details.aspx?id=30135. After reloading my project a couple of times after that the problem went away. I'll post it as an answer.Earwax
S
230

I also fixed this issue by running

aspnet_regiis -i

using the visual studio command line tools as an administrator

Sachiko answered 30/7, 2011 at 0:5 Comment(6)
There are three, count 'em, three, command prompts below Microsoft Visual Studio 2010 | Visual Studio Tools, namely: Visual Studio Command Prompt (2010) Visual Studio x64 Cross Tools Command Prompt (2010) Visual Studio x64 Win64 Command Prompt (2010) Does it matter which one is used for this command?Fuqua
A combination of this: c-sharpcorner.com/uploadfile/rmcochran/… and then entering the above worked for me.Fuqua
With a new machine, I've got the same problem, but the old fix is not working. The Visual Studio command prompt opens for me at: C:\Program Files <x86>\Microsoft Visual Studio 10.0\Common7\IDE ...and entering "aspnet_regiis -i" results in "'aspnet_regiis -i' is not recognized..." Is there a specific location from where I should be entering this command?Fuqua
I use 2013 nto open a web project and have this problem. And I only Find visual studio command prompt(2010) in my computer, thius I use it execute aspnet_regiis -i and use visual studio 2010 to open project and the error disappear, but another error show, then I use Start Without Debugging then this error disappear, too.Antiperspirant
I am still getting the dialog after running aspnet_regiis -i in both the VS 2010 command window (as administrator) and the same window in VS 2017.Justis
if you got and unrecognized that means you are in wrong directory, so based on your OS drive use the following fully path: C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -iCorenda
S
173

This solved the problem

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

Be sure to run the command prompt as administrator

Sofko answered 6/12, 2011 at 6:43 Comment(1)
No need of any reboot or anything - this just works!Louanne
D
44

For those getting this error in after installing .NET Framework 4.6 - Read and install one of these hotfixes to resolve the issue.

Dichloride answered 12/12, 2014 at 20:13 Comment(9)
I'm getting this error with opening a VS 2010 project right after I installed VS 2015 RTM, re registering IIS doesn't do anything, still get the error in VS 2010, VS2013 is working fineAraucaria
This is a link to the KBs for all versions of VS affected by this, not just VS2012. blogs.msdn.com/b/webdev/archive/2014/11/11/…Pyrrhuloxia
@GladeMellor - Thanks. Updated.Dichloride
This issue and the mentioned fixes are also relevant after installing .NET Framework 4.5.3, not just limited to 4.6.Labbe
@ChrisO - 4.5.3 is the same as 4.6. It was only every called 4.5.3 during pre-release. It was 4.6. by the time it went to GA.Dichloride
Thanks, this worked for me. Visual Studio 2012 on windows 10.Ramie
Thanks this worked for me for Visual Studio 2010 SP 1 on windows 10Hungary
Situation you described for Visual Studio Express 2012 for Web on Windows 7. It solves!Arlynearlynne
This fixed my problem.. Thank youCaseworm
I
19

To resolve 'ASP.NET 4.0 has not been registered. You need to manually configure your Web server for ASP.NET 4.0 in order for your site to run correctly' error when opening a solution we can:

1 Ensure the IIS feature is turned on with ASP.NET. Go to Control Panel\All Control Panel Items\Programs and Features then click 'Turn Windows Featrues on. Then in the IIS --> WWW servers --> App Dev Features ensure that ASP.NET is checked.

enter image description here

2 And run the following cmd line to install

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

enter image description here

Hope this helps

Illfavored answered 8/5, 2014 at 17:10 Comment(3)
This is the trick to get it working on Win 8.1 along with making sure that 4.5 s checked.Imtiaz
This is also applies to W10. modelrail.otenko.com/electronics/… Check out this link.Pyroelectric
@teapeng where in my case I selected ASP.NET 4.6Humanist
B
12

The aspnet_regiis approach described above doesn't appear to work on Windows 8.1:

C:\Windows\system32>aspnet_regiis -i

Microsoft (R) ASP.NET RegIIS version 4.0.30319.33440
Administration utility to install and uninstall ASP.NET on the local machine.
Copyright (C) Microsoft Corporation. All rights reserved.
Start installing ASP.NET (4.0.30319.33440).
This option is not supported on this version of the operating system. Administrators should instead install/uninstall ASP.NET 4.5 with IIS8 using the "Turn Windows Features On/Off" dialog, the Server Manager management tool, or the dism.exe command line tool. For more details please see http://go.microsoft.com/fwlink/?LinkID=216771.
Finished installing ASP.NET (4.0.30319.33440).

As indicated in the message, I went to:

  1. Start
  2. Turn Windows features on or off
  3. .NET Framework 4.5 Advanced Services

and checked ASP.NET 4.5.

This seems to have resolved the problem.

Biramous answered 14/12, 2013 at 20:51 Comment(2)
Hmm, When I go to that area "ASP.NET 4.5" is already checked, I unchecked it hit apply and then rechecked it and hit apply but still get that dialog box.Ludwigshafen
This fixed my problem on Windows 8.1 - I installed VS2012 Pro after installing 4.5- weird that it did not auto install these services.Vu
T
10

Open:

Start Menu
-> Programs
-> Microsoft Visual Studio 2010
-> Visual Studio Tools
-> Visual Studio Command Prompt (2010)

Run in command prompt:

aspnet_regiis -i

Make sure it is run at administrator, check that the title starts with Administrator:

enter image description here

Torino answered 23/4, 2013 at 11:47 Comment(0)
B
8

http://msdn.microsoft.com/en-us/library/k6h9cz8h.aspx - See this on registering IIS for ASP.NET 4.0

Bustos answered 29/4, 2011 at 19:12 Comment(1)
aspnet_regiis is a handy function to know. I use it more than I care to admit.Ade
T
7

Asp.net 4.0 has not been registered

Visual Studio 2013 Download Visual Studio 2013 Update 4 For more information on the Visual Studio 2013 Update 4, please refer to: Visual Studio 2013 Update 4 KB Article

Visual Studio 2012 An update to address this issue for Microsoft Visual Studio 2012 has been published: KB3002339 To install this update directly from the Microsoft Download Center, here

Visual Studio 2010 SP1 An update to address this issue for Microsoft Visual Studio 2010 SP1 has been published: KB3002340 This update is available from Windows Update To install this update directly from the Microsoft Download Center, here http://download.microsoft.com/download/6/7/E/67E041A1-00DA-4948-90BE-75A0146C08F5/VS10SP1-KB3002340-x86.exe

Tradeswoman answered 11/4, 2016 at 2:45 Comment(1)
Thanks a lot, the fix for VS 2010 SP1 works for me! (fresh install on a W10)Waldenses
C
4

Go to Visual Studio 2010 Command prompt and set the Directives as :

C:\Windows\Microsoft.NET\Framework\v4.0.30319>

then install IIS by following command:

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

now iis will working.. its better if your restart the computer

Cateran answered 7/4, 2014 at 8:43 Comment(0)
Z
3

I had the same issue but solved it...... Microsoft has a fix for something close to this that actually worked to solve this issue. you can visit this page http://blogs.msdn.com/b/webdev/archive/2014/11/11/dialog-box-may-be-displayed-to-users-when-opening-projects-in-microsoft-visual-studio-after-installation-of-microsoft-net-framework-4-6.aspx

The issue occurs after you installed framework 4.5 and/or framework 4.6. The Visual Studio 2012 Update 5 doesn't fix the issue, I tried that first.

The msdn blog has this to say: "After the installation of the Microsoft .NET Framework 4.6, users may experience the following dialog box displayed in Microsoft Visual Studio when either creating new Web Site or Windows Azure project or when opening existing projects....."

According to the Blog the dialog is benign. just click OK, nothing is effected by the dialog... The comments in the blog suggests that VS 2015 has the same problem, maybe even worse.

Zeba answered 5/11, 2015 at 6:54 Comment(0)
B
2

If ASP.NET 4.0 is not registered with IIS

*****Use this step if u cant access using run command*****

Go to

C Drive
-->>windows
-->>Microsoft.Net
-->>Framework
-->>v4.0.30319

(Choose whatever framework to register with IIS me selecting Framework 4)
-->>aspnet_regiis
(Double-click or right click & choose run as administrator)
Brader answered 22/2, 2013 at 10:43 Comment(0)
T
0

I had this problem on Windows 8.1 which wouldn't support the aspnet_regiis -i approach.

Instead you need to go to Control Panel, locate the "Turn Windows features on or off" option and drill down as follows:

Internet Information Services -> World Wide Web Services -> Application Development Features and check the "ASP.NET 4.5" option. In checking this box, other options such as ".NET Extensibility 4.5" and the ISAPI options will be checked automatically.

Apply the changes by clicking OK. Restart your website in IIS and your site should now be accessible.

Thurmanthurmann answered 29/1, 2014 at 14:15 Comment(0)
E
0

I repaired it using the Microsoft .NET Framework Repair Tool. After reloading my project a couple of times after that the problem went away.

Earwax answered 21/12, 2017 at 16:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.