ASP.NET 4.5 has not been registered on the Web server

asp.net Mvc-4Iis 7.5Sql Server-ExpressLocaldb

asp.net Mvc-4 Problem Overview


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?

asp.net Mvc-4 Solutions


Solution 1 - asp.net Mvc-4

Maybe you have to execute the following in the Visual Studio Tools command prompt:

aspnet_regiis -i

You can read more about the ASP.NET IIS Registration Tool (Aspnet_regiis.exe) here.

Solution 2 - asp.net Mvc-4

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

Solution 3 - asp.net Mvc-4

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.

Solution 4 - asp.net Mvc-4

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".

Solution 5 - asp.net Mvc-4

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

Solution 6 - asp.net Mvc-4

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

Solution 7 - asp.net Mvc-4

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.

Solution 8 - asp.net Mvc-4

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.

Solution 9 - asp.net Mvc-4

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!

Solution 10 - asp.net Mvc-4

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/

Solution 11 - asp.net Mvc-4

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

Solution 12 - asp.net Mvc-4

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.

Solution 13 - asp.net Mvc-4

I have the same problem.

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

Solution 14 - asp.net Mvc-4

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

Solution 15 - asp.net Mvc-4

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.

Solution 16 - asp.net Mvc-4

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

Solution 17 - asp.net Mvc-4

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.

Solution 18 - asp.net Mvc-4

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

Solution 19 - asp.net Mvc-4

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

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionSami-LView Question on Stackoverflow
Solution 1 - asp.net Mvc-4Alex FilipoviciView Answer on Stackoverflow
Solution 2 - asp.net Mvc-4NYCdotNetView Answer on Stackoverflow
Solution 3 - asp.net Mvc-4lasseschouView Answer on Stackoverflow
Solution 4 - asp.net Mvc-4SoorajView Answer on Stackoverflow
Solution 5 - asp.net Mvc-4Ved PrakashView Answer on Stackoverflow
Solution 6 - asp.net Mvc-4Rahul SononeView Answer on Stackoverflow
Solution 7 - asp.net Mvc-4dipan chikaniView Answer on Stackoverflow
Solution 8 - asp.net Mvc-4MirosView Answer on Stackoverflow
Solution 9 - asp.net Mvc-4user3833104View Answer on Stackoverflow
Solution 10 - asp.net Mvc-4Bharath TView Answer on Stackoverflow
Solution 11 - asp.net Mvc-4TPGView Answer on Stackoverflow
Solution 12 - asp.net Mvc-4Travis JView Answer on Stackoverflow
Solution 13 - asp.net Mvc-4Oscar Daniel HutajuluView Answer on Stackoverflow
Solution 14 - asp.net Mvc-4John MathewView Answer on Stackoverflow
Solution 15 - asp.net Mvc-4user1108948View Answer on Stackoverflow
Solution 16 - asp.net Mvc-4MarwaAhmadView Answer on Stackoverflow
Solution 17 - asp.net Mvc-4Hema ShettyView Answer on Stackoverflow
Solution 18 - asp.net Mvc-4MandarView Answer on Stackoverflow
Solution 19 - asp.net Mvc-4vaheedsView Answer on Stackoverflow