IIS 5.0 has a new feature named socket pooling which it uses on machines which have multiple IP addresses. Essentially, when socket pooling is turned on, IIS will grab every IP address on the machine, even if it is explicitly configured to not use one or more of those addresses. The reason that it does so is explained in a technology note about IIS:
In IIS 4.0, each Web site was bound to a different IP address, which meant that each site had its own socket that was not shared with sites bound to other IP addresses. These sockets are created when the site starts, and they consume significant non-paged memory (RAM). This memory consumption limits the number of sites bound to IP addresses that can be created on a single machine.
For IIS 5.0, this process has been modified so that sites bound to different IP addresses, but sharing the same port number, share the same set of sockets. The end result is that more sites can be bound to an IP address on the same machine than in IIS 4.0. In IIS 5.0, these shared sockets are used flexibly among all of the started sites, thus reducing resource consumption.
What does this mean for you, the Fronter web developer? If you intend to set up your IIS 5.0 machine with two or more IP addresses, and have IIS bound to port 80 on all but one address while putting Frontier on port 80 on that remaining one, then socket pooling will prevent Frontier from being able to bind to that last IP address — IIS will still be bound to it. In order to allow Frontier to bind to that IP address, you have to turn off socket pooling, and you also have to set up Frontier to only bind to the intended address.
The IIS configuration side of things
First, you need to make sure that IIS is configured to leave the IP address alone that you want to use for Frontier.
- Open up the Internet Services Manager (from your Administrative Tools program group), and go to the Default Web Site for your machine. Right click on it, and bring up the site Properties.
- On the first tab (Web Site), under Web Site Identification, make sure that the IP Address is not set to “(All Unassigned)”. (This gives IIS every IP address on the machine except those explicitly assigned to other IIS web sites.) Instead, from the pulldown list, choose a specific IP address, and not the IP address that you want Frontier to use.
- If you want IIS to use multiple IP addresses, click on the Advanced button, and enter all of the IP addresses into the Multipl identities for this Web Site box.
- Click OK to close all of the dialog boxes back to the Internet Services Manager, and then close the Internet Services Manager as well.
Now, you need to turn off IIS 5.0 socket pooling. There’s a Microsoft Knowledge Base article (Q238131) that describes how to do that; I’ll recap here. (Note the conditions at the top of the KB article that describe Microsoft’s recommendations for situations in which it is appropriate or inappropriate to disable socket pooling.)
- Make sure that you’re logged into your machine as an administrator-level account, and bring up a command prompt. Change to the IIS adminscripts directory (default: C:inetpubadminscripts).
- Type the following:
cscript adsutil.vbs set w3svc/disablesocketpooling true
- You should get back a reply:
disablesocketpooling : (BOOLEAN) True
- Open the Services… control window (from your Administrative Tools program group), and scroll down to the IIS Admin Service. Stop and start it. (It will tell you that it also has to stop your WWW and FTP services, if you’ve got them both running; let it do that.)
- Restart your World Wide Web Publishing Service (and your FTP Publishing Service, if you had it running before).
The Frontier configuration side of things
In order to set Frontier up to only use one IP address, you have to be running version 6.2a5 or greater. For Userland customers with current support contracts, the alpha version and docs are available on their support website. Once installed and updated, you need to configure Frontier to only use the single intended IP address:
- Open up the user.inetd.config.http table.
- Add a new object named ip, a string, and set its value to the IP address that you would like Frontier to use.
- Quit and restart Frontier.
That’s it — now, Frontier should be using its IP address, and IIS 5.0 should be using the ones that you configured it to take. Check your Windows Event Logs for any errors, lest we messed something up here.
If you have any comments, corrections, additions, or updates on this technote, please either mail me or post a reply in the Discussion Group (the preferred method!) by logging in and typing away.