IIS Hosts File Manager Module


Here's a simple module to solve a recurrent and an annoying everyday task in IIS management: creating an entry in the Windows TCP/IP Hosts file for every demo and test web site.

This module extends the IIS Manager UI in order to add an entry on request in the Hosts file located in %SystemRoot%\System32\drivers\etc\hosts when a web site is created or its bindings are edited.

A full editor is also included in order to easily add/edit/remove entries in the Hosts file.

Requires IIS 7.0, 7.5 or 8.0 (developer preview).

Alessandro Pilotti
MVP ASP.Net / IIS

MVP_Horizontal_FullColor_small.png

Follow alexpilotti on Twitter


Many thanks to Scott Forsyth for suggestions and testing!

Usage samples


Here are some screenshots on Windows 8 (on Windows 2008 / 2008 R2 is similar):

WebsiteAdd2.png

Add a new binding:

BindingAdd.png

Edit an existing binding:

BindingEdit.png

Hosts file editor:

IISManagerHostsFile.png

Add Hosts File Entry form:

AddHostsFileEntry.png

The generated Hosts file lines will look like the following one:

127.0.0.1 www.mytestsite.com # This is a comment



CBSLogo_thumb.png



Last edited Oct 31, 2012 at 10:44 AM by alexp, version 16