Register and Enable a Native Module on a Web server (IIS 7)

Applies To: Windows 7, Windows Server 2008, Windows Server 2008 R2, Windows Vista

You might have to register a native module if an application on your Web server requires the behavior supported by the module. After you register a native module, that module will be loaded and available in every application pool on the server, but you must also enable it by adding it to the list on the Modules feature page. For example, you might have a custom authentication module that an application requires. You must register the .dll file, and then enable the native module to run. You can then enable the module at any level at which the module is needed, such as at a site or an application level.

Note

This procedure explains how to register and enable a native module at the server level. For more information about how to enable a native module to run at a site or an application level, see Enable a Registered Native Module for a Site or an Application (IIS 7).

Prerequisites

For information about the levels at which you can perform this procedure, and the modules, handlers, and permissions that are required to perform this procedure, see Native Modules Feature Requirements (IIS 7).

Exceptions to feature requirements

  • Only server administrators can add native modules to the Web server.

  • Native modules can be added only at the server level in IISĀ 7.

To register a native module on a Web server

You can perform this procedure by using the user interface (UI), by running Appcmd.exe commands in a command-line window, by editing configuration files directly, or by writing WMI scripts.

User Interface

To use the UI

  1. Open IIS Manager and click the server connection in the tree in the Connections pane. For information about opening IIS Manager, see Open IIS Manager (IIS 7).

  2. In Features View, on the serverHome page, double-click Modules.

  3. On the Modules page, in the Actions pane, click Configure Native Modules.

  4. In the Configure Native Modules dialog box, click Register.

  5. In the Register Native Module dialog box, in the Name box, type a name for the native module.

  6. In the Path box, type the file system path of the location of the .dll file, or click the Browse button to navigate to the folder that contains the .dll file, and then click OK.

  7. In the Configure Native Modules dialog box, select the check box of the native module that you just registered, and then click OK.

    This enables the native module to run and makes it available to sites and applications on your Web server.

Note

If you do not want to enable the native module to run, you can click to clear the check box of the native module, and then click OK.

  1. Click OK to dismiss the Configure Native Modules dialog box.

  2. Optionally, you can lock the native module if you do not want it to be overridden at lower levels in the configuration. On the Modules page, select the module, and in the Actions pane, click Lock.

Note

If you do not see the module on the Modules page, the module has not been enabled. To enable the module, you must open the Configure Native Modules dialog box, select the check box of the module, and then click OK.

Command Line

To register a native module on a Web server, use the following syntax:

**appcmd install module /name:**string /image:string/add:true|false /lock:true|false

The variable namestring is the name of your native module. The variable imagestring is the physical path of the module's .dll file in the file system. The add property is a Boolean that specifies whether to also enable the module (when true) or not (when false). The lock property is a Boolean that specifies whether the module can be overridden at a lower level (when true) or not (when false). For example, to register, enable, and lock a module named ImageCopyrightModule with the .dll file in the %windir%\system32\inetsrv directory, type the following at the command prompt, and then press ENTER:

appcmd install module /name:ImageCopyrightModule /image:c:/%windir%/system32/inetsrv/imageCopyrightModule.dll /add:true /lock:true

For more information about Appcmd.exe, see Appcmd.exe (IIS 7).

Configuration

The procedure in this topic affects the following configuration elements:

<globalModules>

<modules>

For more information about IISĀ 7 configuration, see IIS 7.0: IIS Settings Schema on MSDN.

WMI

Use the following WMI classes, methods, or properties to perform this procedure:

  • GlobalModulesSection class

For more information about WMI and IIS, see Windows Management Instrumentation (WMI) in IIS 7. For more information about the classes, methods, or properties associated with this procedure, see the IIS WMI Provider Reference on the MSDN site.

See Also

Concepts

Configuring Native Modules (IIS 7)
Configuring Modules in IIS 7