使用.NET错误2.0的machine.config而不是4.0 [英] .NET using wrong 2.0 machine.config instead of 4.0

查看:208
本文介绍了使用.NET错误2.0的machine.config而不是4.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个.NET Web应用程序安装在IIS 7.0的Windows Server 2008 R1。我已经在服务器上安装.NET 4.0和4.0及综合管线配置的应用程序池。出于某种原因,我收到以下错误:

I have a .NET web application install on IIS 7.0 Windows Server 2008 R1. I have installed .NET 4.0 on the server and configured an app pool for 4.0 and integrated pipeline. For some reason I am getting the following error:

(500.19) The configuration section 'system.web.extensions' cannot be read because
  it is missing a section declaration.

看来,它使用的是2.0版的.NET,而不是 machine.config的 machine.config的文件$ C>已定义的 System.Web.Extensions程序配置部分文件。我通过更换 machine.config的文件中的V2.0框架与一个来自V4.0框架和Web应用程序证明了这不再抛出的 500.19 错误。我试图卸载并重新安装.NET 4.0以及运行为aspnet_regiis -i

It appears that it is using the wrong machine.config file from V2.0 .NET rather than the machine.config file which has defined the system.web.extensions config section. I proved this by replacing the machine.config file in the V2.0 framework with the one from the V4.0 framework and the web application no longer throws the 500.19 error. I have tried to uninstall and reinstall .NET 4.0 as well as running aspnet_regiis -i.

这是为什么它会试图使用任何思想的2.0 machine.config的

Any thoughts on why it would be trying to using the 2.0 machine.config?

推荐答案

不知道,这是真的原因/解决方案,但最后一件事,我尝试它(在IIS管理器):

Not sure, that it's realy reason/solution, but last thing I've try it is (in IIS Manager):

  1. 导航到右边的面板服务器(根节点)
  2. 在功能列表中打开ISAPI和CGI限制
  3. 有一个与设置为拒绝限制,2项带有介绍ASP.NET v4.0.30319
  4. 设置的限制值,以允许

这是我已经尝试过的问题没有了过去的事情。

This is last thing i've tried before issue is gone.

这篇关于使用.NET错误2.0的machine.config而不是4.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆