Asp.net 4.0 has not been registered

2019-01-04 17:44发布

When I try to open my Visual Studio project I get the following error:

Asp.Net has not been registered on the webserver you need to manually configure your webserver for Asp.net 4.0.


Update:
Nevermind I fixed it:

I just repaired .Net Framework 4.0 and the issue was resolved.

13条回答
ら.Afraid
2楼-- · 2019-01-04 17:45

This solved the problem

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

Be sure to run the command prompt "as administrator"

查看更多
狗以群分
3楼-- · 2019-01-04 17:47

I repaired it using the Microsoft .NET Framework Repair Tool. After reloading my project a couple of times after that the problem went away.

查看更多
地球回转人心会变
4楼-- · 2019-01-04 17:48

Go to Visual Studio 2010 Command prompt and set the Directives as :

C:\Windows\Microsoft.NET\Framework\v4.0.30319>

then install IIS by following command:

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

now iis will working.. its better if your restart the computer

查看更多
我只想做你的唯一
5楼-- · 2019-01-04 17:51

I had this problem on Windows 8.1 which wouldn't support the aspnet_regiis -i approach.

Instead you need to go to Control Panel, locate the "Turn Windows features on or off" option and drill down as follows:

Internet Information Services -> World Wide Web Services -> Application Development Features and check the "ASP.NET 4.5" option. In checking this box, other options such as ".NET Extensibility 4.5" and the ISAPI options will be checked automatically.

Apply the changes by clicking OK. Restart your website in IIS and your site should now be accessible.

查看更多
Fickle 薄情
6楼-- · 2019-01-04 17:53

If ASP.NET 4.0 is not registered with IIS

*****Use this step if u cant access using run command*****

Go to

C Drive
-->>windows
-->>Microsoft.Net
-->>Framework
-->>v4.0.30319

(Choose whatever framework to register with IIS me selecting Framework 4)
-->>aspnet_regiis
(Double-click or right click & choose run as administrator)

查看更多
爷、活的狠高调
7楼-- · 2019-01-04 17:59

For those getting this error in after installing .NET Framework 4.6 - Read and install one of these hotfixes to resolve the issue.

查看更多
登录 后发表回答