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 add a wildcard script map, use the following syntax:
appcmd set config /section:handlers /+[name='string',path='string',verb='string',modules="IsapiModule",scriptProcessor='string',resourceType='File | Directory | Either | Unspecified',requireAccess="None | Read | Write | Script | Execute"]
The variable name string is the name of the native handler, and path string is the file name extension or file name that the handler processes; for wildcard script maps, the value is *. The variable verb string is the HTTP verb or list of HTTP verbs to which to restrict the handler, such as GET, HEAD, POST, DEBUG; for wildcard script maps, the value is *. The variable scriptProcessor string is the physical path of the .dll file for the handler. The variable resourceType defines the resource to which the mapping applies; for wildcard script maps, the value is Unspecified. The variable requireAccess defines the type of access that the handler requires to run in a virtual directory; for wildcard script maps, the value is None.
For example, to add a wildcard script map for a native handler named CustomAuth, type the following at the command prompt, and then press ENTER:
appcmd set config /section:handlers /+[name='CustomAuth',path='*',verb='*',modules='IsapiModule',scriptProcessor='C:\Handlers\CustomAuth.dll',resourceType='Unspecified',requireAccess='None']
For more information about Appcmd.exe, see IIS 7.0: Appcmd.exe.
Use the following WMI classes, methods, or properties to perform this procedure:
- HandlersSection class (IIS)
- HttpHandlersSection class (ASP.NET)
For more information about WMI and IIS, see IIS 7.0: Windows Management Instrumentation (WMI). For more information about the classes, methods, or properties associated with this procedure, see the IIS WMI Provider Reference on the MSDN site.