Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at imagehelp@codebetter.com
Prevent IIS from Binding to all Assigned IP Addresses

By default IIS binds (listens) to all IP addresses assigned to the server it's running on.  This is problematic when you'd like one or more of the IP addresses to be used by another application, such as a Ruby on Rails app running on Apache or, in my case, Mingle.  In these instances, it is desirable for IIS to bind to only one or more specific IP addresses while allowing the others to be free for use by other services.  To do so, you must explictly set IIS to listen on the IP address(es); doing so will automatically free all other IP addresses for other uses.  To explicitly add an IP address to the IIS IP Listen list:

  1. Ensure that you have the HttpCfg.exe utility installed onto the server.  If you're running Windows Server 2003, it'll automatically be available, but if you're running Windows XP you can download HttpCfg.exe as part of the Windows XP Service Pack 2 Support Tools.
  2. Open a command prompt and type the following, replacing ###.###.###.### with the IP address you'd like to add to the IIS IP Listen list:
    httpcfg set iplisten -i ###.###.###.###
  3. Upon success, it'll return the following confirmation:  HttpSetServiceConfiguration completed with 0.
  4. Restart the HTTP service.

After restarting the HTTP service, IIS will only bind to the IP address added to the IP Listen list.  You can use the HttpCfg utility to inform IIS to listen to more than one IP address as well.  If you want to see all IP addresses that IIS is listening to, simply run "httpcfg query iplisten" in a command prompt.

Billy McCafferty


Posted 09-02-2008 5:01 PM by Billy McCafferty

[Advertisement]

Comments

Simone Busoli wrote re: Prevent IIS from Binding to all Assigned IP Addresses
on 09-03-2008 3:28 AM

Can't this be done via the IIS administration gui?

Billy McCafferty wrote re: Prevent IIS from Binding to all Assigned IP Addresses
on 09-03-2008 7:30 AM

Can it?  I haven't found a mechanism to do so, but I'd love to know if there is a way via IIS.

IHateSpaghetti {code} wrote Blog Carnival #3
on 09-03-2008 1:00 PM

Visual Studio Extensibility/ DSL Tools How to open files from the Output window - by Pablo How do I obtain

Arjan`s World » LINKBLOG for September 3, 2008 wrote Arjan`s World » LINKBLOG for September 3, 2008
on 09-03-2008 4:37 PM

Pingback from  Arjan`s World    » LINKBLOG for September 3, 2008

Recent URLs tagged Binding - Urlrecorder wrote Recent URLs tagged Binding - Urlrecorder
on 01-06-2009 8:16 AM

Pingback from  Recent URLs tagged Binding - Urlrecorder

Roberto wrote re: Prevent IIS from Binding to all Assigned IP Addresses
on 01-26-2009 6:12 AM

I've tried with httpcfg but still not work...seems like iis still bind both ip addresses

Arnold34 wrote re: Prevent IIS from Binding to all Assigned IP Addresses
on 10-22-2009 9:50 AM

Even if this was a considerable exaggeration, it seemed, on reflection, ungenerous to tear up the legal release form and throw them out. ,

Boy84 wrote re: Prevent IIS from Binding to all Assigned IP Addresses
on 10-23-2009 8:07 AM

Interview or hold       focus groups with current and past participants. ,

About The CodeBetter.Com Blog Network
CodeBetter.Com FAQ

Our Mission

Advertisers should contact Brendan

Subscribe
Google Reader or Homepage

del.icio.us CodeBetter.com Latest Items
Add to My Yahoo!
Subscribe with Bloglines
Subscribe in NewsGator Online
Subscribe with myFeedster
Add to My AOL
Furl CodeBetter.com Latest Items
Subscribe in Rojo

Member Projects
DimeCasts.Net - Derik Whittaker

Friends of Devlicio.us
Red-Gate Tools For SQL and .NET

NDepend

SlickEdit
 
SmartInspect .NET Logging
NGEDIT: ViEmu and Codekana
LiteAccounting.Com
DevExpress
Fixx
NHibernate Profiler
Unfuddle
Balsamiq Mockups
Scrumy
JetBrains - ReSharper
Umbraco
NServiceBus
RavenDb
Web Sequence Diagrams
Ducksboard<-- NEW Friend!

 



Site Copyright © 2007 CodeBetter.Com
Content Copyright Individual Bloggers

 

Community Server (Commercial Edition)