[visual-studio-2010] Asp.net 4.0 has not been registered

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.

The answer is


This solved the problem

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

Be sure to run the command prompt as administrator


I also fixed this issue by running

aspnet_regiis -i

using the visual studio command line tools as an administrator


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


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


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


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.


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.


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


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)


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


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.


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


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


Examples related to visual-studio-2010

variable is not declared it may be inaccessible due to its protection level SSIS Excel Connection Manager failed to Connect to the Source This project references NuGet package(s) that are missing on this computer Gridview get Checkbox.Checked value error LNK2038: mismatch detected for '_MSC_VER': value '1600' doesn't match value '1700' in CppFile1.obj What is the difference between Visual Studio Express 2013 for Windows and Visual Studio Express 2013 for Windows Desktop? Attach (open) mdf file database with SQL Server Management Studio What is and how to fix System.TypeInitializationException error? Could not load file or assembly "Oracle.DataAccess" or one of its dependencies IIS error, Unable to start debugging on the webserver

Examples related to iis

ASP.NET Core 1.0 on IIS error 502.5 CS1617: Invalid option ‘6’ for /langversion; must be ISO-1, ISO-2, 3, 4, 5 or Default Publish to IIS, setting Environment Variable IIS Manager in Windows 10 The page cannot be displayed because an internal server error has occurred on server The service cannot accept control messages at this time NuGet: 'X' already has a dependency defined for 'Y' Changing project port number in Visual Studio 2013 System.Data.SqlClient.SqlException: Login failed for user "This operation requires IIS integrated pipeline mode."

Examples related to visual-studio-2012

How to actually search all files in Visual Studio Tests not running in Test Explorer How to use _CRT_SECURE_NO_WARNINGS Could not load file or assembly 'Microsoft.ReportViewer.Common, Version=11.0.0.0 How can I resolve the error: "The command [...] exited with code 1"? Could not load file or assembly Exception from HRESULT: 0x80131040 MSVCP120d.dll missing How can I change IIS Express port for a site The program can't start because MSVCR110.dll is missing from your computer Controlling execution order of unit tests in Visual Studio

Examples related to iis-7

Accessing a local website from another computer inside the local network in IIS 7 500.21 Bad module "ManagedPipelineHandler" in its module list HTTP Error 503. The service is unavailable. App pool stops on accessing website IIS - 401.3 - Unauthorized 500.19 - Internal Server Error - The requested page cannot be accessed because the related configuration data for the page is invalid ASP.NET Web API application gives 404 when deployed at IIS 7 WebApi's {"message":"an error has occurred"} on IIS7, not in IIS Express enabling cross-origin resource sharing on IIS7 How to fix 'Microsoft Excel cannot open or save any more documents' IIS 7, HttpHandler and HTTP Error 500.21

Examples related to windows-8.1

while installing vc_redist.x64.exe, getting error "Failed to configure per-machine MSU package." SQL Developer with JDK (64 bit) cannot find JVM Windows 8.1 gets Error 720 on connect VPN ADB Driver and Windows 8.1 Eclipse interface icons very small on high resolution screen in Windows 8.1 Asp.net 4.0 has not been registered