检测到模块注册出错(找不到 RegisterModule 入口点)

Microsoft.Windows.InternetInformationServices.6.2.Module.registration.error.detected.failed.to.find.RegisterModule.entrypoint (Rule)

Knowledge Base article:

摘要

通过 Internet Information Services (IIS) 8,开发人员可轻松配置本机和托管的代码模块,这些模块用于处理向 Web 服务器发出的请求。为使工作进程可以加载模块,必须正确配置这些模块。正确的模块配置要求模块具有唯一名称和有效类型或路径。被管理的模块可以指定是否仅为对 ASP.NET 应用程序或被管理处理程序的请求调用它们。在指定对象之后,此设置可优化性能。

解决方法

更正模块的注册

在 IIS8 环境中,模块是可订阅服务器事件的逻辑实体。Web 服务器被配置为在服务器启动时加载模块。在启动时,服务器要求模块注册其感兴趣的事件。模块实现负责为所需的事件注册模块。如果模块不具备有效的入口点,以便服务器访问并注册模块,则注册过程将失败。

若要解决此问题,请执行下列步骤:

创建 ApplicationHost.config 文件的备份

若要创建 ApplicationHost.config 文件的备份,请执行以下操作:

将使用您指定的备份名称在 %Windir%\system32\inetsrv\backup 目录下创建目录。如果不指定名称,则 appcmd 将使用当前日期和时间自动生成目录名称。

从配置中删除模块

若要从配置中删除模块,请执行以下操作:

要详细了解 globalModules 部分,请参阅 IIS 8: 为 globalModules 添加元素(IIS 设置架构)

Element properties:

TargetMicrosoft.Windows.InternetInformationServices.6.2.WebServer
CategoryAlert
EnabledTrue
Event_ID2295
Event SourceMicrosoft-Windows-IIS-W3SVC-WP
Alert GenerateFalse
RemotableTrue
Event LogApplication

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource Microsoft.Windows.EventProvider Default
WA WriteAction Microsoft.Windows.Server.IIS.6.2.GenerateAlertAction.SuppressedByDescription Default

Source Code:

<Rule ID="Microsoft.Windows.InternetInformationServices.6.2.Module.registration.error.detected.failed.to.find.RegisterModule.entrypoint" Enabled="true" Target="Microsoft.Windows.InternetInformationServices.6.2.WebServer" ConfirmDelivery="false" Remotable="true" Priority="Normal" DiscardLevel="100">
<Category>Alert</Category>
<DataSources>
<DataSource ID="DS" TypeID="Windows!Microsoft.Windows.EventProvider">
<ComputerName>$Target/Host/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
<LogName>Application</LogName>
<Expression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">PublisherName</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">Microsoft-Windows-IIS-W3SVC-WP</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery>EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value>2295</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="WA" TypeID="Microsoft.Windows.Server.IIS.6.2.GenerateAlertAction.SuppressedByDescription">
<Priority>1</Priority>
<Severity>1</Severity>
<AlertMessageId>$MPElement[Name="Microsoft.Windows.InternetInformationServices.6.2.Module.registration.error.detected.failed.to.find.RegisterModule.entrypoint.AlertMessage"]$</AlertMessageId>
</WriteAction>
</WriteActions>
</Rule>