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?
targetFramework="4.5"
attribute to the <compilation>
element.
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.
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
/all
necessary? Here: support.microsoft.com/kb/2736284 they do not specify it...
If you've installed .NET framework 4.6, you may see this error due to a VS bug. Workarounds and resolutions here:
EDIT:
As noted in some of the comments, this can happen behind the scenes after upgrading to Windows 10 or Visual Studio 2015.
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".
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
Resolved it with VS update.
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
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.
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.
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.
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!
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/
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
I have the same problem.
And got the solution turning on the ASP Net from Turn Windows feature on or off
menu.
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.
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
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
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.
run visual studio in admin rights and execute following "commandaspnet_regiis -i"
I had the same problem. After a long search , I change the application pool to ASP.NET v4.x
in the IIS manager.
Success story sharing
aspnet_regiis
from the latest .Net framework library:C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe /i