【发布时间】:2012-09-10 21:56:14
【问题描述】:
我在 IIS 7.0 Windows Server 2008 R1 上安装了一个 .NET Web 应用程序。我已经在服务器上安装了 .NET 4.0 并为 4.0 和集成管道配置了一个应用程序池。由于某种原因,我收到以下错误:
(500.19) The configuration section 'system.web.extensions' cannot be read because
it is missing a section declaration.
似乎它使用了来自 V2.0 .NET 的错误 machine.config 文件,而不是定义了 system.web.extensions 配置部分的 machine.config 文件。我通过将 V2.0 框架中的 machine.config 文件替换为 V4.0 框架中的文件来证明这一点,并且 Web 应用程序不再抛出 500.19 错误。我已尝试卸载并重新安装 .NET 4.0 以及运行 aspnet_regiis -i。
对为什么要尝试使用 2.0 machine.config 有任何想法吗?
【问题讨论】:
-
您是否运行
aspnet_regiis -iru向IIS 注册ASP.NET 4? -
我没有尝试过这些参数,但我只是做了,仍然得到错误。
标签: .net iis-7 machine.config