在我的Win 7开发机器中,为了使用SQL Express实例而不是默认安装的localDB . 我在我的MVC 4项目属性页面(Web选项卡)中取消选中“使用IIS Express”,然后我收到以下错误:
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.
我确认在IIS功能中激活了ASP.NET .
请问可以做些什么来解决这个问题?
19 回答
在Windows 8.1上,由于.NET 4.5是内置的,修复方法是从管理命令提示符运行它:
.net框架覆盖4.0文件夹,因此运行此命令:
将.net框架注册到IIS goto
开始 - >运行 - > cmd - >以管理员类型运行:
您需要通过“程序和功能”添加的内容 . 看看下面的链接解决了我的问题 . 只需按照以下步骤操作即可获得 .
引自链接:
http://modelrail.otenko.com/electronics/asp-net-4-5-has-not-been-registered-on-the-web-server
如果您已安装.NET framework 4.6,则可能会因VS错误而看到此错误 . 这里的解决方法和解决方案:
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
编辑:
正如一些评论中所述,这可能在升级到Windows 10或Visual Studio 2015后的幕后发生 .
对于Windows 8客户端计算机,请在“Internet信息服务 - >万维网服务 - >应用程序开发功能 - > ASP.NET 4.5”下的“打开/关闭Windows功能”中打开“IIS-ASPNET45” .
我有完全相同的问题,尽管ASP.NET 4.5出现在“打开/关闭Windows功能”下安装 . 我尝试了一切,直到我最终从“打开/关闭Windows功能”下完全删除了ASP.NET 3.5和4.5,重启了我的电脑并重新安装了它们 . 这解决了这个问题 .
在管理员权限中运行visual studio并执行以下“commandaspnet_regiis -i”
我在使用Visual Studio 2012时遇到了同样的问题 . 通过打开IIS功能只是不起作用,因为我仍然收到错误 . 试试method but no lucky.
我的解决方案是:
下载hotfix.
在命令行中,通过键入
iisreset /noforce YourComputerName
Restart IIS,然后按Enter .也许你必须在 Visual Studio Tools 命令提示符下执行以下命令:
您可以阅读有关 ASP.NET IIS Registration Tool (Aspnet_regiis.exe) here的更多信息 .
VS更新解决了它 .
点击此链接(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已针对所有受影响的Microsoft Visual Studio版本发布了修补程序 .
Visual Studio 2013 -
下载Visual Studio 2013 Update 4有关Visual Studio 2013 Update 4的更多信息,请参阅:Visual Studio 2013 Update 4 KB文章Visual Studio 2012
已发布针对Microsoft Visual Studio 2012解决此问题的更新:KB3002339要直接从Microsoft下载中心安装此更新,请在此处Visual Studio 2010 SP1
已发布针对Microsoft Visual Studio 2010 SP1解决此问题的更新:KB3002340此更新可从Windows Update获得直接从Microsoft下载中心安装此更新,此处为
我也遇到了这个问题 . 我尝试了上述解决方案,但对我不起作用 .
我安装了visual studio更新,我的问题已修复 .
从以下链接下载visual studio更新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
谢谢!
要启用的某些IIS功能:Reference
然后修复ASP.NET的IIS映射,运行Aspnet_regiis.exe实用程序 . Reference
试试这个进入“程序和功能”窗口 - >后,点击左侧窗格中的“打开或关闭Windows功能” .
现在向下滚动树,找到:
Internet信息服务万维网服务应用程序开发功能...然后检查所需的所有相关功能 . 我选择了.NET 3.5和4.6 .
如果不起作用然后去让它做它的工作然后你应该回到VS的快乐发展之地,然后才知道它 . 如果没有,那么它实际上可能是Visual Studio中的错误 . 请检查以下针对您的VS版本的补丁:VS2010,VS2012或VS2013 . 这肯定会帮助你 .
不需要输入c:\
开始 - >运行 - > cmd - >以管理员身份运行并执行以下命令
.NET Framework版本4(32位系统)
%windir%\ Microsoft.NET \ Framework \ v4.0.30319 \ aspnet_regiis.exe -i
.NET Framework版本4(64位系统)
%windir%\ Microsoft.NET \ Framework64 \ v4.0.30319 \ aspnet_regiis.exe -i
或者使用Visual Studio工具的命令提示符:C:\ ProgramData \ Microsoft \ Windows \ Start Menu \ Programs \ Microsoft Visual Studio 2012 \ Visual Studio Tools> VS2012 x86 Native Tools命令提示符
版本可能会有所不同..希望这有帮助
这个链接解释了什么导致问题和快速解决问题,它只是通过更新visual studio并提供更新的链接
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
For windows 10 with below error: 为ASP.NET 4.5配置Web http://localhost:64886/失败 . 您必须为ASP.NET 4.5手动配置此站点才能使站点正确运行 . ASP.NET 4.0尚未在Web服务器上注册 . 您需要为ASP.NET 4.0手动配置Web服务器,以便您的站点正确运行 . 解决方案: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/
tl;dr; Clicking OK is the workaround, everything will work fine after that.
我也收到了这条错误消息 .
环境:Windows 10,IIS8,VS 2012 Web .
在找到此页面以及几个看似有侵略性的解决方案后,我按照此处的建议阅读了https://support.microsoft.com/en-us/help/3002339/unexpected-dialog-box-appears-when-you-open-projects-in-visual-studio处的修补程序选项 .
请避免做任何过于激烈的事情,并注意该页面标有“解决方法”的部分,如下所示:
换句话说,在对话框上单击“确定”一次,消息将永远消失 . 该项目将工作得很好 .
我有同样的问题 . 经过长时间的搜索,我在IIS管理器中将应用程序池更改为
ASP.NET v4.x
.我也有同样的问题 .
并从
Turn Windows feature on or off
菜单中获得了解决ASP Net的解决方案 .