Hosting an IIS Site in a Local Area Network

So, you have published your first IIS site, and now you want to try hosting, running, or testing it on your LAN (Local Area Network). Here are some things I had to do to get it working:

  • Go to Control Panel -> Network and Internet -> Network and Sharing Center -> Change advanced sharing settings, and then ensure that “Turn on network discovery” is enabled.
  • Go to Windows Firewall -> Advanced settings. In Windows Firewall with Advanced Security, go to Inbound Rules. Sort by Name and enable “World Wide Web Services (HTTPS Traffic-In)” as well as “World Wide Web Services (HTTP Traffic-In)”. These will enable Local Port 443 and 80 for inbound communications.
  • Go to Internet Information Services (IIS) Manager. Expand your server, go to Sites, and right-click the site in question. Click on “Edit Bindings…”, and give your site a binding with a simple, one word hostname, like the name of your PC and make it either an HTTP or HTTPS binding (so host it on either port 80 or 443). For example, I gave my site a name of “crapplication”. Click on Restart under Manage Website to restart the site.
  • On some other computer in your Local Area Network, try browsing to http://crapplication and you should see your site.

If you don’t see the site at this point, you may have a pretty hardcore firewall blocking your connection or some other type of routing issue. Try to disable all firewalls and then try it again. Ensure that you can also ping the machine that’s running your IIS site. Usually, routers will tell you the LAN IP of your computers, so you can try and use Command Prompt to ping between LAN IPs.

Alexandru

"To avoid criticism, say nothing, do nothing, be nothing." - Aristotle

"It is wise to direct your anger towards problems - not people; to focus your energies on answers - not excuses." - William Arthur Ward

"Science does not know its debt to imagination." - Ralph Waldo Emerson

"Money was never a big motivation for me, except as a way to keep score. The real excitement is playing the game." - Donald Trump

"All our dreams can come true, if we have the courage to pursue them." - Walt Disney

"Mitch flashes back to a basketball game held in the Brandeis University gymnasium in 1979. The team is doing well and chants, 'We're number one!' Morrie stands and shouts, 'What's wrong with being number two?' The students fall silent." - Tuesdays with Morrie

I'm not entirely sure what makes me successful in general programming or development, but to any newcomers to this blood-sport, my best guess would be that success in programming comes from some strange combination of interest, persistence, patience, instincts (for example, someone might tell you that something can't be done, or that it can't be done a certain way, but you just know that can't be true, or you look at a piece of code and know something doesn't seem right with it at first glance, but you can't quite put your finger on it until you think it through some more), fearlessness of tinkering, and an ability to take advice because you should be humble. Its okay to be wrong or to have a bad approach, realize it, and try to find a better one, and even better to be wrong and find a better approach to solve something than to have had a bad approach to begin with. I hope that whatever fragments of information I sprinkle across here help those who hit the same roadblocks.

Leave a Reply

Your email address will not be published. Required fields are marked *