DNN websites, modules, skins and support

Menu: Blog

Testing sites on your development machine from other devices in your local network

By:

Sometimes you want to test your dev work on multiple devices before putting it on a test server. Of course, you will already have tested it locally, with your browser development tools, but testing on real devices gives additional insight and can show issues your browser won't show.

I recently got a new development machine, and it always takes some time to have your tools setup the way you want it. Today, I needed to test a component on a website on my dev machine from different devices in my home network. It took some digging to get everything working and connected. This is what I did:

  1. Set up the website as the default website in IIS
  2. Opened the TCP port 80 in the Windows defender firewall
  3. Checked the ip address for my local machine
  4. Browsed from my phone to the ip address

Of course, it did not work right away…

First, I needed to (re)set the default website in IIS. You can delete the IIS default website or change the port number from 80 to something else and stop the site, the latter is what I did.

Getting an empty hostname in the “add bindings” dialog for my new site took me some time to figure out, it is possible when you first start typing in the host name textbox and then remove all characters again, now you can save it…

Second, I got “ERR_ADDRESS_UNREACHABLE” in my phone browser. This can mean anything, but after adding a rule in my firewall, I could reach IIS, but still no site (I got a default 404). The problem was that I forgot to add my ip address as the site alias in the PortalAlias table (or use the site alias function under site settings). Now I got my site working on my phone and iPad.

However, my Android tablet still showed the “ERR_ADDRESS_UNREACHABLE” message, and only after completely clearing the cache it played along.

One more thing: be sure to add the words “default site” to the name of your IIS site, then you can easily find the site (and remove the blank host name binding) when you have a new site to test.

Happy testing!