0

我正在尝试dotnet core在 IIS集群环境中运行我的应用程序。当共享配置被禁用时,它可以完美运行。但很快我启用共享配置,应用程序无法启动,并给出错误:

HTTP Error 500.21 - Internal Server Error

Handler "ExtensionlessUrl-Integrated-4.0" has a bad module "ManagedPipelineHandler" in its module list

几天以来我一直在寻找解决方案,但对我没有任何帮助。SO上的大多数帖子要求安装/重新安装.NET 4/4.5等,但这不适用于我的情况,因为它已经更新。

以下是我的配置的相关部分 (如果需要,我可以提供更多)

网络配置

...    
<handlers>
  <remove name="WebDAV" />
  <remove name="ExtensionlessUrl-Integrated-4.0" />
  <add name="ExtensionlessUrl-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG,DELETE,PUT" type="System.Web.Handlers.TransferRequestHandler" />
</handlers> ...

共享 applicationHost.config

<handlers>
...
 <add name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" path="*." verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
 <add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*." verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
 <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" responseBufferLimit="0" />
 <add name="StaticFile" path="*" verb="*" modules="StaticFileModule,DefaultDocumentModule,DirectoryListingModule" resourceType="Either" requireAccess="Read" />
</handlers>
...
...
<modules>
  ...
  <add name="ApplicationInitializationModule" lockItem="true" />
  <add name="AspNetCoreModule" />
  <add name="RewriteModule" />
  <add name="ApplicationRequestRouting" />
</modules>

有什么我想念的吗?当禁用 IIS 的共享配置或通过 .exe 运行时,应用程序运行良好。所以我相信已经安装了所需的功能。共享配置案例是否特别需要任何功能/包?请指导。

4

0 回答 0