PenGuide 1:  How To Set up IIS for PenDraw to Operate through CGI (Common Gateway Interface)

Version 1, Andrew Main, 21 November 2005

 

HOW TO CONFIGURE IIS TO HANDLE .PDRS FILES

When you install IIS, by default it sets up a web site at

C:\Inetpub\wwwroot

We assume that you have not changed this path (so if you have changed it, you may need to adapt what we say from this point on).

Firstly, you need to put the PenDraw Album (program) that you want to run into C:\Inetpub\wwwroot.  PenDraw albums must have the .pdrs extension.  Assuming that you are putting helloworld.pdrs there, you should now have a file with this path:

C:\Inetpub\wwwroot\helloworld.pdrs

The main thing you need to do now, which is what we cover in the rest of this section, is to tell IIS what to do with files that have the extension .pdrs.

Secondly, open Internet Information Services (the program that manages IIS).  If you don’t know where it is, you should find it through the Control Panel: open the Administrative Tools folder: you should see Internet Information Services so open it (it is a program).  It will open a window with two ‘panes’; the left one is the ‘Console Tree’, but if it is not showing there is an icon to toggle between Show and Hide (or you can use View|Customise).  In the Console Tree pane you will see a tree with Internet Information Services as the root, typically with just one branch: the name of your computer with “(local computer)”,

At this point, suppose your computer is called EZ: you would see EZ (local computer).

Thirdly, open the tree to get to your default web site.  You open EZ (local computer).  That shows a folder called Web Sites.  You open Web Sites.  That shows a web site called Default Web Site.  Let’s assume that this is the web site you want to add PenDraw support for.

At this point you should see something like Figure A.


Figure A – IIS application: Showing Default Web Site.  Check that your site is in Running State (right hand pane).  If it is not Running, right-click on it, and click Start.

 

Fourthly, right-click on (the Web site you want to add PenDraw support for) Default Web Site.  Then select the Properties command from the shortcut menu. When the Web site's properties sheet appears, select the Home Directory tab.  On the Home Directory Tab, click the Configuration button to display the Application Configuration properties sheet. The Mappings tab is the default tab, and is the one you want (so click on it if you aren’t already on it).

At this point you should see something like the window in Figure B.  If you look carefully at Figure B, you will see that it has “.pdrs” in the Exten… column (ie File Extensions column).  And if you look carefully at the actual one for your computer, it will not have a .pdrs entry in that column (unless you already did this and forgot!).

Fifthly, click the Add button to open the Add/Edit Application Extension Mapping dialog box. In the Executable field, enter the location of the PenDraw.exe file, eg:

C:\Program Files\PenDraw\PenDraw.exe

In the Extension field you enter the file extension you want to associate with PenDraw: type in .pdrs (including the dot).

Sixthly, make sure that the All Verbs option and the Script Engine and Check That File Exists check boxes are selected, and click OK. When completely filled in, the Add/Edit Application Extension Mapping dialog box should look something like the one shown in Figure B.  The differences are

  1. that .pdrs will be the last entry: if you look at it again later on, it will have been put in alphabetical order)
  2. that your path will probably be C:\Program Files\PenDraw\PenDraw.exe, whereas mine happens to be something else.

 

 

 

Figure B – IIS web site properties: Home Directory tab: Application Configuration: Mappings

 

 

 

 

Seventhly and finally, you

  1. Close the Application Configuration dialog box by hitting OK.
  2. Close the web site Properties window by hitting OK
  3. Close Internet Information Services Application.

 

Your web server is now ready to run PenDraw Albums (programs).