Fixing “ASP.NET 2.0 has not been registered on the Web server.” error in Visual Studio

Recently I was working on very very old ASP.Net Project which was built on using .Net 2 framework. That thing was so ancient that VS2019 (or VS2015)  won’t even load it due to it’s dependent 3rd party libraries were also incompatible. I was able to get Visual Studio 2008 Pro using my MSDN license. All was good till I tried to load project solution, I was greeted with following message

“Creation of the virtual directory http://localhost/MyApp failed with the error: ASP.NET 2.0 has not been registered on the Web server. You need to manually configure you Web server for ASP.NET 2.0 in order for your site to run correctly.”

I assumed it meant to say that for whatever reasons ASP.NET 2.0 is not installed. But verified that .Net 3.5 component is already installed in Windows features. I also verified that .Net 2 is present in my app pools as well. So I didn’t quite understood what the issue is.

 

But doing quick duckduckgo search, I found that since I installed VS2008 after that fact it didn’t register .Net 2 in IIS and that is causing this issue. You can register .Net using aspen_regiis.exe. But apparently there are multiple versions of it… per .Net framework version that you have installed in your OS. So all was needed was to run specific version of that app and register .Net 2 framework. 

For that I used following command…

c:\windows\microsoft.net\framework\v2.0.50727\aspnet_regiis.exe –i

VisualStudio

And after that my project loaded just fine.

That’s it for now…

Leave a Reply

Your email address will not be published. Required fields are marked *