Internet Information Services (IIS) 8 enables developers to easily configure native and managed code modules that process requests made to the Web server. In order for worker processes to load them, the modules must be configured correctly. Proper module configuration requires that the module have a unique name, and a valid type or path. Managed modules can specify whether they should be invoked only for requests to ASP.NET applications or managed handlers. When specified, this setting can optimize performance.
Correct a module's preconditions
Module entries have an optional preCondition attribute that can contain conditions for the module to be loaded. For example, the preCondition can specify that IIS load the module only for application pools that run in integrated mode, only for application pools that run in ISAPI mode, or only for application pools that use a specified .NET Framework version. This last setting makes it possible to use separate versions of the managed engine module for application pools that use different versions of the CLR runtime.
Here is an example from the globalModules section of the ApplicationHost.config file of a module entry that has a preCondition attribute :
<globalModules>
<add name="ManagedEngine"
image="%Windir%\Microsoft.NET\Framework\v2.0.50727\webengine.dll"
preCondition="integratedMode,runtimeVersionv2.0,bitness32"
/>
</globalModules>
Before loading each module, the server evaluates the precondition if one is present in configuration. If any one of the load preconditions return false, the module is not loaded.
To resolve this issue:
Back up the ApplicationHost.config file. To do this, see Section A.
Find and correct the module's preCondition attribute. Make sure it is correctly configured and that it matches the characteristics of the application pool or worker processes that will use the module. To find the attribute, see Section B.
After the preconditions are corrected, the module should load succesfully.
Back up the ApplicationHost.config file
To back up the ApplicationHost.config file:
Open an elevated Command Prompt window. Click Start, point to All Programs, click Accessories, right-click Command Prompt, and then click Run as administrator.
Change to the directory %Windir%\system32\inetsrv.
Type appcmd add backup backupName to back up the ApplicationHost.config file.
A directory with the backup name that you specify will be created under the %Windir%\system32\inetsrv\backup directory. If you do not specify a name, Appcmd.exe will generate a directory name automatically using the current date and time.
Find the module entry in the ApplicationHost.config file
To find the module entry in the ApplicationHost.config file:
Open an elevated Command Prompt window. Click Start, point to All Programs, click Accessories, right-click Command Prompt, and then click Run as administrator.
Type cd %Windir%\system32\inetsrv\config
Type notepad applicationHost.config
In notepad, search for the globalModules section under the system.webServer section.
Find the module entry that contains the preCondition attribute and modify it if you have to.
Save the ApplicationHost.config file, and exit notepad.
For more information about the globalModules section, see IIS 8: add Element for globalModules (IIS Settings Schema).
Target | Microsoft.Windows.InternetInformationServices.6.2.WebServer |
Category | Alert |
Enabled | True |
Event_ID | 2296 |
Event Source | Microsoft-Windows-IIS-W3SVC-WP |
Alert Generate | False |
Remotable | True |
Event Log | Application |
ID | Module Type | TypeId | RunAs |
---|---|---|---|
DS | DataSource | Microsoft.Windows.EventProvider | Default |
WA | WriteAction | Microsoft.Windows.Server.IIS.6.2.GenerateAlertAction.SuppressedByDescription | Default |
<Rule ID="Microsoft.Windows.InternetInformationServices.6.2.Module.has.an.invalid.precondition" 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>2296</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.has.an.invalid.precondition.AlertMessage"]$</AlertMessageId>
</WriteAction>
</WriteActions>
</Rule>