[asp.net-mvc-4] ASP.NET 4.5 has not been registered on the Web server

In my Win 7 development machine, and in order to use SQL Express instance instead of the localDB installed by default. I unchecked "Use IIS Express" in my MVC 4 project properties page (Web tab), then I got the following error:

ASP.NET 4.5 has not been registered on the Web server. You need to manually configure your Web server for ASP.NET 4.5 in order for your site to run correctly.

I verified that ASP.NET is activated within the IIS features.

Please what could be done to resolve this?

This question is related to asp.net-mvc-4 iis-7.5 sql-server-express localdb

The answer is


I had the exact same problem, despite ASP.NET 4.5 appearing as installed under "Turn Windows Features On/Off". I tried everything until I finally removed ASP.NET 3.5 and 4.5 completely from under "Turn Windows Features On/Off", rebooted my PC and reinstalled them Again. That solved the problem.


On Windows 8.1, since .NET 4.5 is built-in, the fix is to run this from an administrative command-prompt:

dism.exe /Online /Enable-Feature /all /FeatureName:IIS-ASPNET45

I had the same problem. After a long search , I change the application pool to ASP.NET v4.x in the IIS manager.


The .net framework overwrites 4.0 folder so run this command:

Register .net framework to IIS goto
Start -> run-> cmd -> run as administrator type:

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

this link explains what cause the problem and the quick solve to the problem, it just by updating visual studio and it provide the link for the update

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


For Windows 8 client computers, turn on "IIS-ASPNET45" in "Turn Windows Features On/Off" under "Internet Information Services-> World Wide Web Services -> Application Development Features -> ASP.NET 4.5".


Something you need to add via the Programs & Features. Check out the link below that solved my issue. Just follow the steps below and you should get it.

Quoted from the link:

Once in the Programs and Features window, hit the "Turn Windows Features on or off" in the left pane.

Now scroll down through the tree and find:

Internet Information Services > World Wide Web Services > Application Development Features ...and then check all the relevant features you require. I chose .NET 3.5 and 4.6.

http://modelrail.otenko.com/electronics/asp-net-4-5-has-not-been-registered-on-the-web-server


If you've installed .NET framework 4.6, you may see this error due to a VS bug. Workarounds and resolutions here:

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

EDIT:

As noted in some of the comments, this can happen behind the scenes after upgrading to Windows 10 or Visual Studio 2015.


Resolved it with VS update.

Follow this link (https://blogs.msdn.microsoft.com/webdev/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/)

Resolution: Microsoft has published a fix for all impacted versions of Microsoft Visual Studio.

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


Some IIS features to be enabled: Reference

DISM /Online /FeatureName:IIS-ApplicationDevelopment 
/FeatureName:IIS-ASPNET /FeatureName:IIS-ASP 
/FeatureName:IIS-NetFxExtensibility 
/FeatureName:IIS-ISAPIExtensions /FeatureName:IIS-ISAPIFilter

Then fix IIS mappings for ASP.NET, run the Aspnet_regiis.exe utility. Reference


For windows 10 with below error: Configuring Web http://localhost:64886/ for ASP.NET 4.5 failed. You must manually configure this site for ASP.NET 4.5 in order for the site to run correctly. 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. Solution: https://blogs.msdn.microsoft.com/webdev/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/


I have the same problem.

And got the solution turning on the ASP Net from Turn Windows feature on or off menu.


I was also having that problem. I tried the above solutions but didn't work for me.

The i installed the visual studio update and my issue was fixed.

Download the visual studio update from the link below 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

Thanks!


run visual studio in admin rights and execute following "commandaspnet_regiis -i"


tl;dr; Clicking OK is the workaround, everything will work fine after that.

I also received this error message.

Configuring Web http://localhost:xxxxx/ for ASP.NET 4.5 failed. You must manually configure this site for ASP.NET 4.5 in order for the site to run correctly. 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.

Environment: Windows 10, IIS8, VS 2012 Web.

After finding this page, along with several seemingly invasive solutions, I read through the hotfix option at https://support.microsoft.com/en-us/help/3002339/unexpected-dialog-box-appears-when-you-open-projects-in-visual-studio as suggested here.

Please avoid doing anything too drastic, and note the section of that page marked "Workaround" as shown below:

Workaround


To work around this issue, click OK when the dialog box appears after you either create a new project or open an existing Web Site Project or Windows Azure project. After you do this, the project works as expected.

In other words, click OK on the dialog box one time, and the message is gone forever. The project will work just fine.


Try this Once go to the Programs and Features window->, hit the "Turn Windows Features on or off" in the left pane.

Now scroll down through the tree and find:

Internet Information Services World Wide Web Services Application Development Features ...and then check all the relevant features you require. I chose .NET 3.5 and 4.6.

and if does not work then go to Let it do its work and then you should be back to happy-development-land in VS before you know it. If not, then it could actually be a bug in Visual Studio. Please check the following patches for your version of VS: VS2010, VS2012 or VS2013. This will surely help you out.


I have the same issue when using Visual Studio 2012. By turn on the IIS feature just not working, because I still received the error. Try the method but no lucky.

My solution is:

  • Download the hotfix.
  • At the command line, Restart IIS by typing iisreset /noforce YourComputerName, and press ENTER.

Not required to type c:\

Start -> run-> cmd -> Run as administrator and execute below command


.NET Framework version 4 (32-bit systems)

%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i

.NET Framework version 4 (64-bit systems)

%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -i

Alternatively use Command Prompt from Visual Studio tools: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Visual Studio 2012\Visual Studio Tools>VS2012 x86 Native Tools Command Prompt

Version could vary.. Hope this helps.


Examples related to asp.net-mvc-4

Better solution without exluding fields from Binding How to remove error about glyphicons-halflings-regular.woff2 not found When should I use Async Controllers in ASP.NET MVC? How to call controller from the button click in asp.net MVC 4 How to get DropDownList SelectedValue in Controller in MVC Return HTML from ASP.NET Web API There is no ViewData item of type 'IEnumerable<SelectListItem>' that has the key country Return JsonResult from web api without its properties how to set radio button checked in edit mode in MVC razor view How to call MVC Action using Jquery AJAX and then submit form in MVC?

Examples related to iis-7.5

The client and server cannot communicate, because they do not possess a common algorithm - ASP.NET C# IIS TLS 1.0 / 1.1 / 1.2 - Win32Exception Register .NET Framework 4.5 in IIS 7.5 HTTP Error 401.2 - Unauthorized You are not authorized to view this page due to invalid authentication headers IIS error, Unable to start debugging on the webserver How do I get to IIS Manager? How prevent CPU usage 100% because of worker process in iis How do I give ASP.NET permission to write to a folder in Windows 7? ASP.NET 4.5 has not been registered on the Web server Fixing slow initial load for IIS "Cannot verify access to path (C:\inetpub\wwwroot)", when adding a virtual directory

Examples related to sql-server-express

SQL Server® 2016, 2017 and 2019 Express full download SQL Server after update trigger How to create a connection string in asp.net c# SQL Insert Query Using C# ASP.NET 4.5 has not been registered on the Web server Connecting to SQL Server Express - What is my server name? CREATE FILE encountered operating system error 5(failed to retrieve text for this error. Reason: 15105) Enable tcp\ip remote connections to sql server express already installed database with code or script(query) Default instance name of SQL Server Express How do I fix a "Performance counter registry hive consistency" when installing SQL Server R2 Express?

Examples related to localdb

How to add LocalDB to Visual Studio 2015 Community's SQL Server Object Explorer? How to connect to LocalDB in Visual Studio Server Explorer? ASP.NET 4.5 has not been registered on the Web server How to connect to LocalDb What is the connection string for localdb for version 11