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.
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).
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.
To use the UI
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).
In Features View, on the serverHome page, double-click Modules.
On the Modules page, in the Actions pane, click Configure Native Modules.
In the Configure Native Modules dialog box, click Register.
In the Register Native Module dialog box, in the Name box, type a name for the native module.
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.
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.
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.
Click OK to dismiss the Configure Native Modules dialog box.
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.
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.
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).
The procedure in this topic affects the following configuration elements:
For more information about IIS 7 configuration, see IIS 7.0: IIS Settings Schema on MSDN.
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.