我有一个安装在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
命令来将 ASP.NET 4 注册到 IIS? - Russ Cam