Sunday, July 30, 2017

Error when trying to open my asp.net 4.5 MVC web application using VS 2012. Asp.net has not been registered on the server

Leave a Comment

I have a Windows Server 2012 R2 & Visual Studio Professional 2012. now i use to develop an asp.net 4.5 mvc 4 web application without any problem. but now when i try to open the project i will get this error:-

enter image description here

if i click OK then this error:-

enter image description here

if i click OK the visual studio will stop working

enter image description here

so can anyone adivce what is going on ??

and here is how the Turn windows features on/off looks like:- enter image description here

Now i did this modification, as i read on a post in the internet that deleting the cache might help. so i removed this folder:-

%LocalAppData%\Microsoft\VisualStudio\11.0\ComponentModelCache 

then i tried to open the Visual Studio, and i got the same 2 errors, but the visual studio did not stop working, and i was able to modify the code i rebuild the project and run it.. so not sure what is going on ?

5 Answers

Answers 1

In order to resolve this error you have to install related version of .Net framework in your system.

First install IIS if not installed.

Then run following command:

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

OR (Depens on your OS)

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

And in IIS your site should run on pool with version like : .Net FrameWork v4.0.xxxxxx

Answers 2

aspnet_regiis -i 

Using the ASP.NET IIS Registration tool, you can perform tasks such as the following:
Register or remove the .NET Framework ASP.NET installation with IIS.
Create new ASP.NET application pools.
Display the status of all installed versions of ASP.NET.
More here

Edit 1:-

dism /online /enable-feature /featurename:IIS-ASPNET45 /all 

Try running this command

Edit 2:-

Try downloading and installing this update

This is a related tweet

If you get KB3002339 hanging kill the VSUpdate process in task manager. Windows Update will finish. Bing/Google KB3002339 install manually. https://twitter.com/blowdart/status/542542342075346945

Answers 3

See if the computer has self updated to .NET 4.6 (due to Windows Update task). In some situations, the installation of .NET 4.6 may impact on Visual Studio 2012.

In my case I had to upgrade my project to NET 4.6 to solve the problem.

In relation to IIS itself, I guess you may be forgotten some feature - as HTTP which I guess is necessary, even if you won't utilize it directly. Check all features and toogle OFF just those really optional (like FTP).

Answers 4

This reminds me of similar issues I have seen in the past and I strongly suspect it's an installation order related thing which ultimately boils down to the aspnet_regiis command which has been mentioned already (here's some more information on this topic: https://rockyprogress.wordpress.com/2011/09/06/iis-7-5-and-net-framework-4-installation-order-does-matter/).

You would generally want to install IIS first and then .NET afterwards. So I suggest you get rid of the .NET 4.5 installation again by using the "Turn Windows Features On/Off" screen and then later simply add it back in.

Answers 5

Please try below point

1) open Visual studio run as administration

2) Please host your site in IIS (Not on port like localhost:65389...)

3) Make sure about application pool (with framework 4.0)

4) run C:\Windows\Microsoft.NET\Framework\v4.0.30319> aspnet_regiis -i command

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment