This article explains how to set up an IIS Web server to use with CSP (Caché Server Pages) on a different computer from where Caché is installed. This document refers to the Web server as Machine W and to the computer running Caché as Machine C. The setup includes the following procedures:
Install Caché Shell on Web Server Machine
Install a minimal Caché shell on the Web server machine, Machine W. Reference the Caché Installation Guide if you need more detailed information. During the installation process, follow these instructions:
This creates the CSP directory structure on Machine W and creates virtual directory references for the /CSP and /CSP/Bin files in IIS.
Manipulate CSP Initialization File
Next, manipulate the CSP initialization file, csp.ini, on Machine W:
An example of the original csp.ini file on Machine W:
[SYSTEM]
Server_Response_Timeout=60
Queued_Request_Timeout=60
Run_Time_Script=CSPms.dll
[SYSTEM_INDEX]
LOCAL=Enabled
[LOCAL]
Ip_Address=127.0.0.1
TCP_Port=1972
[APP_PATH_INDEX]
/=Enabled
/csp=Enabled
[APP_PATH:/]
Default_Server=LOCAL
[APP_PATH:/csp]
Default_Server=LOCAL
NameSpace=Samples
An excerpt from the Cache.cpf file on Machine C:
[CSP.Applications]
CSPApp_1=/csp/samples,samples,1,1,,900,1,,SAMPLES,1,,,
CSPApp_2=/csp/user,user,1,1,,900,1,,USER,1,,,
CSPApp_3=/csp/pattaya,pattaya,1,1,,900,1,,PATTAYA,0,,,
CSPApp_4=/myapp,c:/cachesys/csp/myapp/,1,1,,900,1,,MYAPP,1,,,
The line beginning with CSPApp_4, only exists if you have established an application name allowing users to access pages without typing /csp/. For example: http://domain.com/myapp/login.csp, as opposed to http://domain.com/csp/myapp/login.csp. If you do not have special application paths such as this set up, you can ignore the /myapp additions to the csp.ini file shown later in this section.
An example of the altered csp.ini file (changes/additions indicated by comments):
[SYSTEM]
Server_Response_Timeout=60
Queued_Request_Timeout=60
Run_Time_Script=CSPms.dll
[SYSTEM_INDEX]
LOCAL=Enabled
CACHEMACHINE=Enabled           // new line
[LOCAL]
Ip_Address=127.0.0.1
TCP_Port=1972
[CACHEMACHINE]                 // new line
Ip_Address=xxx.xxx.xxx.xxx     // new line
TCP_Port=1972                  // new line
[APP_PATH_INDEX]
/=Enabled
/csp=Enabled
/myapp=Enabled                 // new line
[APP_PATH:/]
Default_Server=CACHEMACHINE    // changed server name
[APP_PATH:/csp]
Default_Server= CACHEMACHINE   // changed server name
NameSpace=Samples
[APP_PATH:/myapp]              // new line
Default_Server=CACHEMACHINE    // new line
CACHEMACHINE is simply an internal name used in this csp.ini file and can be changed to another word.
You must specify the correct Ip_Address of Machine C. If you changed the port on which the Caché SuperServer is running, you must replace 1972 with that altered port number.
The changes added for the path /myapp is for the special application path previously discussed in the Cache.cpf file. Replace “myapp” with the names of your applications as found in Cache.cpf. You may add more than one. If you do not have any special application paths, simply ignore these changes. Optionally, you could add this application using the CSP Gateway Configuration Manager instead of manually in this file by accessing http://localhost/csp/bin/cspmssys.dll.
Create Directories on Web Server
To properly serve CSP pages, create empty directories on Machine W representing your namespaces. These empty directories must exist for your Web server to function properly. You do not have to place any CSP files here; they reside on Machine C.
Under the directory CacheSys\CSP on Machine W, create \Samples and \User directories. Also create directories for any other namespace which may contain CSP pages. In the example Cache.cpf shown above, create directories for \pattaya and \myapp.
In the future, if you add a new namespace on Machine C which may contain CSP pages, you must create another empty directory of the same name on Machine W.
Add Virtual Directories
Add virtual directories to IIS for any applications that have a special application path, for example, /myapp.
If you do not have an application path resembling /myapp in the previous examples, ignore this step. You must set it up with properties similar to the /csp virtual directory which is automatically created for you by the CSP installation.
On the Virtual Directory tab in the CSP Properties dialog box, ensure that you click Scripts and Executables in the Execute Permissions list box: