Share via


Event ID 2296 — IIS W3SVC Module Configuration

Applies To: Windows Server 2008 R2

Internet Information Services (IIS) versions 7.0 and 7.5 enable 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.

Event Details

Product: Internet Information Services
ID: 2296
Source: Microsoft-Windows-IIS-W3SVC-WP
Version: 7.5
Symbolic Name: W3_EVENT_MODULE_BAD_PRECONDITION
Message: The Module name '%1' path '%2' has an invalid precondition '%3'.

Resolve

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:

  1. Back up the ApplicationHost.config file. To do this, see Section A.
  2. 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.
  3. After the preconditions are corrected, the module should load succesfully.

To perform these procedures, you must have membership in Administrators, or you must have been delegated the appropriate authority.

A. Back up the ApplicationHost.config file

To back up the ApplicationHost.config file:

  1. Open an elevated Command Prompt window. Click Start, point to All Programs, click Accessories, right-click Command Prompt, and then click Run as administrator.

  2. Change to the directory %Windir%\system32\inetsrv.

  3. 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.

B. Find the module entry in the ApplicationHost.config file

To find the module entry in the ApplicationHost.config file:

  1. Open an elevated Command Prompt window. Click Start, point to All Programs, click Accessories, right-click Command Prompt, and then click Run as administrator.
  2. Type cd %Windir%\system32\inetsrv\config
  3. Type notepad applicationHost.config
  4. In notepad, search for the globalModules section under the system.webServer section.
  5. Find the module entry that contains the preCondition attribute and modify it if you have to.
  6. Save the ApplicationHost.config file, and exit notepad.

For more information about the globalModules section, see IIS 7.0: add Element for globalModules (IIS Settings Schema).

Verify

You can use IIS Manager or Task Manager to verify that a module is functioning.

To perform these procedures, you must have membership in Administrators, or you must have been delegated the appropriate authority.

Verify that a module is running by using IIS Manager

To verify that a module is running by using IIS Manager:

  1. Click Start, click Control Panel, and then click Administrative Tools.
  2. Right-click Internet Information Services (IIS) Manager and select Run as administrator.
  3. In the Connections pane, expand the computer name.
  4. Expand Sites.
  5. Select the Web site that is hosting the module that you want to verify.
  6. In the Actions pane, click the link under Browse Web Site. If the Web page appears, the worker process is running.

Verify that a module is running by using Task Manager

To verify that a module is running by using Task Manager:

  1. Click Start, Run, type taskmgr, and press ENTER.
  2. Click the Processes tab. When the Web page that uses the module is loaded, the IIS worker process W3wp.exe will appear in the Image Name column.

IIS W3SVC Module Configuration

Internet Information Services (IIS) 7.5