IIS Express Configuration for Web Connection
Microsoft introduced a stand-alone version of IIS called IIS Express that can run on machines that don't have or are unable to run a full version of IIS. IIS Express is small (< 5meg download), runs on Windows XP/2003 and later, requires no administrative rights, is local-only by default and can be started from the Windows command line or from FoxPro using the Web Connection Console.
IIS Express runs the same codebase as IIS 7-10 but is scaled to be able to run as a standalone program with its own isolated configuration. There's nothing global to configure or set up beyond the base installation - it's self contained and only runs when you start it. It's 99%+ compatible with full IIS including support for security and certificates and doesn't require administrative rights once installed.
- Install IIS Express 10 (Windows 7+) or IIS Express 7.5 (XP/Vista)
- Launch IIS Express from FoxPro
- Navigate to http://localhost:7000 (or whatever port you pick)
To launch from FoxPro you can use any of the following:
*** Launch IIS Express in your Web Folder on port :7000 DO console WITH "IISEXPRESS","c:\webconnectionprojects\WebDemo\Web\","7000" *** Brings up the IIS Express Launcher DO console WITH "IISEXPRESS" *** In a v7.0+ project you can just do - IISExpress.prg does the above DO IISExpress
The second and third parameters are optional and if not specified assume you want the
..\Web folder relative to your current
.\Deploy folder in a project, and port
You can also bring up a form that lets you pick the path from the Web Connection Menu and using Start IIS Express Web Server.
Read on for more detail and more execution and installation options.
- Doesn't require a full installation of IIS.
- Can run without the need for administrative privileges.
- Is manually launched and shut down via Command Line - no Service running.
- Doesn't expose any remote connections by default.
- Runs on all Windows XP and later versions of Windows including Home and Starter editions.
- Is a full featured implementation of the full IIS Server functionality.
- Is a small downloadable package that installs quickly (<5 megs)
- Works with Web Connection with ISAPI (wc.dll) or .NET Handler (WebConnectionModule.dll)
IIS Express is a simple and small downloadable package you can grab from Microsoft from this URL:
IIS Express 10 (Windows 10, 8, 7)
IIS Express 7.5 (Windows XP,Vista)
If you're using any version of Visual Studio and install the Web payload IIS Express is already installed.
To do development with the IIS Express Web Server takes two steps:
- Launch IIS Express
- Navigate to the local server's root site URL (http://localhost:8080/ for example)
- You're off and running
IIS Express is a standalone Windows executable. Once installed it can just be started via command line. The Web Connection menu includes a convenient shortcut helper that allows you to launch the IIS Web Server and specify the parameters needed to launch IIS Express:
When you click the menu option a small launcher form pops up:
On this form you can point at the Web root folder that holds your HTML files and a numeric port number that the server will run on. By default IIS Express uses port 8080, but you can use any HTTP port you like.
You can also launch IIS Express directly with the Console from within FoxPro:
DO CONSOLE WITH "IISEXPRESS","c:\webconnectionprojects\usersecuritymanager\web",7000
or if you want the interactive dialog to come up:
DO CONSOLE WITH "IISEXPRESS"
You can also run these from the WIndows Command line in the Web Connection install folder by running
Once launched IIS Express essentially runs each folder you point to as a distinct Web site. To access the site's root folder and default page type:
To access any Web Connection links simply reference them directly in the root folder. For example to run a Web Connection sample page use:
Note that you should always use script maps with IIS 7-10 rather than accessing wc.dll directly which is not supported by default in IIS7-10. IIS Express does not support calling the wc.dll directly.
It's recommended that with IIS Express 7 through 10 you use the .NET Managed Handler (webconnectionmodule.dll) rather than the ISAPI DLL (wc.dll) and that you ALWAYS use script maps. Both handler and ISAPI manager are functionally equivalent when used with script maps, but the managed handler is optimized for IIS 7/10's integrated pipeline that mixes native and .NET code.
For more information, check out the topic on the Managed Handler.
You can find more information about IIS Express running and the sites that are actively running in it in the Task Tray. An IIS Express icon lurks in the Task Tray which when clicked shows a summary of each site along with links to each of the site and their site configurations.
You can expand the icon and see a summary of sites:
When you create a site for IIS Express it creates a full IIS application instance including its own ApplicationHost.config file which holds the full site configuration. Site configuration holds some important information, such as authentication methods supported, timeouts, filters and so forth.
To find the configuration file associated with IIS Express bring up the Show All Applications link on the System Tray menu for IIS Express. When you do you'll see this dialog:
Note the link to the Configuration file. You can click the link to edit the configuration file.
One missing feature of the default IIS Express install is that it doesn't include any authentication schemes as configured. To enable Basic and/or Windows Authentication you have to edit the ApplicationHost.config file as follows:
- Open the Config file shown in the figure above
- Search for basicAuthentication and/or windowsAuthentication
- Set the enabled attribute value to true for at least one of the two
This is necessary in order for authentication to work on the admin links.
IIS Express is essentially launched via a Windows commandline. The Web Connection IIS Express launcher form that pops up is merely a wrapper form that creates a command line and then launches IIS Express.
However if you prefer you can launch IIS Express yourself. You can find out more about the IIS Express Command Line here:
Web Connection typically launches IIS Express like this (all on one line):
<program files>\IIS Express\IISExpress.exe /path:"c:\westwind\wconnect" /port:8080 /systray:true
While this will certainly work, we still recommend you use the CONSOLE as it creates a custom applicationhost.config to support all of the features that Web Connection requires.
See alsoUsing the Web Connection Managed Handler
Comment or report problem with topic