将 ASP.NET 从 IIS 7 升级到 8.5

本文关键字:ASP NET IIS | 更新日期: 2023-09-27 18:34:21

我们正在尝试将我们的 Web 应用程序服务器从 2008 年迁移到 2012 年。作为其中的一部分,我们还将 IIS 主机从 7 升级到 8.5。

当我尝试访问我们在新盒子上拥有的最简单的应用程序时,具有与我们当前工作生产环境相同的 web.config,我收到以下错误(在主机上本地使用 IE)。

HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
Module
   WebSocketModule 
Notification
   BeginRequest 
Handler
   ExtensionlessUrlHandler-ISAPI-4.0_64bit 
Error Code
   0x80070490 
Config Error
   The configuration section 'system.webServer/webSocket' cannot be read because it is missing a section declaration  
Config File
   ''?'C:'XXX'XXX'XXX'web.config 
Config Source:
   -1: 
    0: 

我们的网络服务器部分如下所示。

<system.webServer>
    <modules>
        <add type="DevExpress.Web.ASPxHttpHandlerModule, DevExpress.Web.v15.1, Version=15.1.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" name="ASPxHttpHandlerModule" />
    </modules>
    <validation validateIntegratedModeConfiguration="false" />
    <handlers>
        <add type="DevExpress.Web.ASPxHttpHandlerModule, DevExpress.Web.v15.1, Version=15.1.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" verb="GET,POST" path="DX.ashx" name="ASPxHttpHandlerModule" preCondition="integratedMode" />
        <add name="ASPxUploadProgressHandler" preCondition="integratedMode" verb="GET,POST" path="ASPxUploadProgressHandlerPage.ashx" type="DevExpress.Web.ASPxUploadProgressHttpHandler, DevExpress.Web.v15.1, Version=15.1.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
    </handlers>
</system.webServer>

使用我的基本模式查找技能,我尝试在 webSocket 部分添加。

<system.webServer>
    <webSocket enabled="false"/>
    <modules>
        <add type="DevExpress.Web.ASPxHttpHandlerModule, DevExpress.Web.v15.1, Version=15.1.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" name="ASPxHttpHandlerModule" />
    </modules>
    <validation validateIntegratedModeConfiguration="false" />
    <handlers>
        <add type="DevExpress.Web.ASPxHttpHandlerModule, DevExpress.Web.v15.1, Version=15.1.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" verb="GET,POST" path="DX.ashx" name="ASPxHttpHandlerModule" preCondition="integratedMode" />
        <add name="ASPxUploadProgressHandler" preCondition="integratedMode" verb="GET,POST" path="ASPxUploadProgressHandlerPage.ashx" type="DevExpress.Web.ASPxUploadProgressHttpHandler, DevExpress.Web.v15.1, Version=15.1.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
    </handlers>
</system.webServer>

然后,错误消息将更改为以下内容。

HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
Module
   IIS Web Core 
Notification
   BeginRequest 
Handler
   Not yet determined 
Error Code
   0x8007000d 
Config Error

Config File
   ''?'C:'MDM'Webs'Symcom'web.config 

我到底在这里错过了什么?我们的工作 IIS 7 部署和新的 IIS 8.5 部署之间的配置的唯一区别是我尝试提供配置的 webSocket 部分。

将 ASP.NET 从 IIS 7 升级到 8.5

事实证明,我们已经安装了 .NET,并在注册表中为其配置了配置值,但不是作为服务器管理器的一部分。我们还必须重新启动服务器以允许它完成一些更新。

一旦我们通过服务器管理器安装它并回收应用程序池,一切都是笨拙的。