Access an IIS Express site from a remote computer

1 – FOR VISUAL STUDIO 2015: As was pointed out to me in a comment by Søren Nielsen, in Visual Studio 2015 the IIS Express configuration files have moved. They are now separate per project, and stored in /{project folder}/.vs/config/applicationhost.config. Which is much better, in my opinion, just don’t forget to add .vs/ to your .gitignore/.hgignore files!

You will find something like this:

<site name="Alpha.Web" id="2">
    <application path="/">
        <virtualDirectory path="/" physicalPath="C:\Users\Johan\HgReps\Alpha\Alpha.Web" />
        <binding protocol="http" bindingInformation="*:58938:localhost" />

In , add another row:

<binding protocol="http" bindingInformation="*:58938:" />

(But with your IP, and port number, of course)

2 – Allow incoming connections
If you’re running Windows 7, pretty much all incoming connections are locked down, so you need to specifically allow incoming connections to your application. First, start an administrative command prompt. Second, run these commands, replacing with whatever IP and port you are using:

netsh http add urlacl url= user=everyone

This just tells http.sys that it’s ok to talk to this url.

netsh advfirewall firewall add rule name="IISExpressWeb" dir=in protocol=tcp localport=58938 profile=private remoteip=localsubnet action=allow

This adds a rule in the Windows Firewall, allowing incoming connections to port 58938 for computers on your local subnet.

To delete the rules you can do this:

netsh http show urlacl
netsh http delete urlacl url=