IIS configuration

From wiki.visual-prolog.com

Revision as of 16:19, 31 July 2014 by Thomas Linder Puls (talk | contribs) (extend)

This tutorial describes how to perform various configurations of the Microsoft Internet Information Services (IIS).

The tutorial will be based on the settings needed for the jsonRpcService_isApi in the webRPC example directory, but most of these things will be relevant and easily adjusted to other related cases.

The jsonRpcService_isApi project creates is an ISAPI plug-in (dll), which implements a JSON-RPC service. The example also contains some related HTML, CSS and JavaScript files that must be accessible to the client browser. So the IIS needs to be configured for two purposes:

  • A file provider
  • An ISAPI service

All IIS configuration takes place in the Internet Information Services Manager.

Configuring Windows Components

To use the Internet Information Services, Manager and run ISAPI's and/or CGI's plugins you will have to ensure that it is at all available on the computer.

In Programs and Features -> Turn Windows Features on or off make sure that the following is available:

  • Internet Information Services
  • IIS Management Console
  • CGI (not actually required for the jsonRpcService_isApi example)
  • ISAPI Extensions

IISM prerequisites 1.png IISM prerequisites 2.png


Application Pool

The ISAPI service must run in a suitable Application Pool. Application Pools provide process isolation between various parts of the IIS, which gives the following advantages:

  • It makes the overall IIS more robust as problem in one application pool is less likely to have impact on the other application pools (exhausting the entire system will of course cross interfere)
  • Each pool can have different settings (of for example .net platform)
  • Each pool can be restarted independent of the other pools

To create an application pool, select "Add Application Pool..." in the context menu on the Application Pools. Pools suitable for Visual Prolog programs, does not require any .net platform, and it is recommended to have no .net support at all to minimize the interference risks. You give it a name and (unless you for other reasons need it) select "No Managed Code" (the rest you leave as it is):

IISM addAppPool 1.png IISM addAppPool 2.png

32 bit support

Notice that by default (on a 64 bit platform) the application pool cannot run 32 bit programs, so you may need to switch this "Advanced Setting" on:

File:IISM 32bit 1.png IISM 32bit 2.png

File Serving

The jsonRpcService_isApi example needs to serve files to the Web Browser that run the Web Application. Such one can be set up either as a "Virtual Directory" or an "Application" ("Application" is only needed if programs also have to be run in that part of the Web).

IISM add webRPC 1.png IISM add webRPC 2.png

ISAPI setup

IISM handlerMapping 1.png IISM handlerMapping 2.png IISM handlerMapping 3.png IISM handlerMapping 4.png IISM handlerMapping 5.png