Skip to main content

Microsoft IIS 7 or Later

Microsoft IIS 7 or Later

In this build, the Microsoft ISAPI extensions (CSPms.dll, CSPmsSys.dll and CSPcms.dll) have been adapted such that they can work directly to the Native Modules interface in IIS 7. This is the web server supplied with Windows Vista and Windows Server 2008.

The Gateway modules that we supply can work with the Native Modules in IIS 7. They can also be used with ISAPI extensions. There are additional configuration options for customers who are using the NSD. This section describes how to configure your IIS 7 web server to work with the Native Modules. The appendix Alternative Configurations for Microsoft Windows contains information on configuring IIS 7 for other configurations.

Install Locations for IIS 7

Install the CSP Gateway components and the CSP static files as follows:

  1. The default location for the Native Modules

    • CSPms.dll (Runtime module)

    • CSPmsSys.dll (Systems Management module)

    The default location for these modules is:

    C:\Inetpub\CSPGateway

    The configuration file (CSP.INI) and Event Log (CSP.LOG) are written in this directory for non NSD-based connectivity options.

  2. HyperEvents Components

    • CSPBroker.js

    • CSPxmlhttp.js

    The default location for these files is:

    C:\cache-install-dir\csp\broker

  3. Miscellaneous static resources used by the CSP Samples

    A number of static web resources (such as image files) are required by the CSP Samples. The default location for these files is:

    C:\cache-install-dir\csp\samples

  4. Miscellaneous static resources used by the Management Portal (Caché v5.1 and later)

    A number of static web resources (such as image files) are required by the Management Portal. The default location for these files is:

    C:\cache-install-dir\csp\sys

Recommended Option: Using Native Modules (CSPms*.dll)

This is the recommended and most-used configuration option. It uses the new Native Modules interface supplied with IIS 7. This option provides the best performance.

For other configuration options using ISAPI or NSD, see the appendix Alternative Configuration Options for Microsoft Windows.

Register the Native Modules and configure the web server so that it recognizes CSP requests (files of type .csp, .cls, and .zen) and passes them to the CSP Gateway for processing. Include any additional files that might be required for your installation (such as, for example, special CSP resources needed for DeepSee).

Registering the Native Modules

DLLs: CSPms.dll and CSPmsSys.dll

Before these modules can be used they must be registered with IIS. This is done in the Internet Information Services (IIS) Manager control panel.

  1. Open the Internet Information Services (IIS) Manager window.

  2. In the left panel, highlight: [MACHINE_NAME] ([machine_name]\[user_name])

  3. In the middle panel, double-click the Modules icon.

  4. In the right panel, select Add Native Module (or Configure Native Modules).The precise wording depends on the build of IIS in use.

  5. Select Register and enter the following in the Register Native Module dialogue:

    Name: CSPms

    Path: C:\inetpub\CSPGateway\CSPms.dll

    Select OK.

  6. In the left panel, expand the top level and expand Web Sites, and Default Web Site. Highlight Default Web Site:

    [MACHINE_NAME] ([machine_name]\[user_name])
                Web Sites
                        Default Web Site
    
  7. In the right panel, select Add Native Module.

  8. Select CSPms and select OK.

Mapping the CSP File Extensions

Note:

Do NOT use Add Wildcard Script Mapping utility for this file extension mapping process; it will give you an error! Instead, use the utility called Add Module Mapping for *.

Map the CSP file extensions to the CSP Gateway Native Modules as follows:

Extension Native Module Binary
*.csp CSPms C:\inetpub\CSPGateway\CSPms.dll
*.cls CSPms C:\inetpub\CSPGateway\CSPms.dll
*.zen CSPms C:\inetpub\CSPGateway\CSPms.dll
*.cxw CSPms C:\inetpub\CSPGateway\CSPms.dll
  1. Open the Internet Information Services (IIS) Manager window.

  2. In the left panel, expand the top level and expand Web Sites, then the Default Web Site section. Highlight Default Web Site:

    [MACHINE_NAME] ([machine_name]\[user_name])
                Web Sites
                        Default Web Site
    
    Note:

    This activates CSP for the whole web site. To restrict the use of CSP to specific virtual sub-directories (such as /csp/) focus control on the appropriate subdirectory (under Default Web Site) before creating the mappings. Repeat the process for each virtual subdirectory from which CSP content is to be served.

  3. In the middle panel, double-click the Handler Mappings icon.

  4. In the right panel, select Add Module Mapping.

  5. In the Add Module Mappings dialogue, enter the following details:

    Request Path: *.csp

    Module: (select CSPms from the dropdown)

    Name:CSPGateway_csp

  6. Select Request Restrictions and ensure that the box is not checked next to Invoke handler only if request is mapped to. This action sets the value of Path Type to Unspecified, as shown in the Handler Mappings table.

  7. Select OK to return to the Add Module Mappings dialogue and select OK again.

  8. Repeat the above process to add the following Module Mappings:

    Request Path: *.cls

    Module: (select CSPms from the list)

    Name:CSPGateway_cls

    Request Path: *.zen

    Module: (select CSPms from the list)

    Name:CSPGateway_zen

    Request Path: *.cxw

    Module: (select CSPms from the list)

    Name: CSPGatewayManagement

Registering Additional File Types with CSP

To configure additional file types to be processed by CSP, replicate the configuration created for the usual file extensions (that is, .csp,. .cls, .zen) for the new file extension(s).

If you need to serve other static files through the CSP Gateway, add mappings for the needed file types so that those files can be loaded. In particular, if you need to access the Management Portal through this web server, add mappings for file types .jpg, .gif, .png, .css, and .js. If you do not do so, the Management Portal will be missing its images.

To map requests for all files to CSP for a given path, set up the following wildcard entry for that path:

Extension Native Module Binary
* CSPms C:\inetpub\CSPGateway\CSPms.dll

Operating and Managing the Gateway

To access the CSP Gateway’s systems management suite, point your browser at the following location:

http://<ip_address>/csp/bin/Systems/Module.cxw

The CSP engine is automatically invoked for requested files that contain a .csp, .cls, or .zen extension. For example:

http://<ip_address>/csp/samples/menu.csp

If you see an unauthorized user error message, refer to the security notes in the section “CSP Gateway and Security”.

Configuring IIS to Return SOAP Fault Details

A Caché web service that encounters an error may return an HTTP 500 error without the associated SOAP fault details. By default, IIS returns extended error information only to local clients. However, you can modify this behavior in the <httpErrors> element within the configuration file web.config. To do so, add the following section to instruct IIS to dispatch detailed error information to all clients.

<configuration>
    <system.webServer>
       <httpErrors errorMode="Detailed" />
    </system.webServer>
</configuration>

Use caution with this approach as sensitive information about the hosting environment may be revealed to clients. An alternative approach that avoids the security concerns of using errorMode="Detailed” is to instead use the existingResponse="PassThrough" directive.

<configuration>
    <system.webServer>
       <httpErrors existingResponse="PassThrough" />
    </system.webServer>
</configuration>

Restart IIS after making changes to the configuration.

You can make these changes manually to the IIS web.config file. Or, for a better, less error prone, approach, use the Configuration Editor built into the IIS Manager.

  1. In the IIS Manager, from the Connections panel on the left, select the path which corresponds to the web service. For example: Default Web Site, then csp.

  2. In the middle panel, under the section heading Management at the bottom, double-click on Configuration Editor.

  3. In the Configuration Editor dropdown at the top labeled Section, expand system.webServer and click httpErrors.

  4. Click on the value next to existingResponse and use the dropdown to view the options. Select PassThrough.

  5. In the Actions pane on the right, click Apply.

  6. Restart IIS after making changes to the configuration.

Further information about error handling in IIS can be found at:

http://www.iis.net/configreference/system.webserver/httperrorsOpens in a new tab

FeedbackOpens in a new tab