We often develop websites that require specific styling to render properly on the iPad via Safari. By default, sites served from one’s development machine are not accessible by other machines. So how does one go about allowing your iPad to access your website running within your local development environment? While not entirely straightforward, it’s actually a fairly simple process.

Step One: Ensure that you are using IIS Express.

  1. Right-click on the web project within Visual Studio 2012’s Solution Explorer and choose “Properties”.
  2. On the “Web” tab, choose “Use Local IIS Web Server” under the “Servers” section.
    • The Project URL should be something like: http://localhost:55611/ Notice that we have specified a particular port. Let’s assume 55611 for the remainder of this post.

Step Two: Set up IIS Express to allow remote connections to the site.

  1. This is done by adding an additional binding to the IIS Express applicationhost.config file. On Windows 8, this file is located at the following path: C:\Users\[Your Name]\My Documents\IISExpress\config\applicationhost.config
  2. Open this file and locate the line for the site that corresponds to the port that you have previously setup for your project. It will look something like this:
    <binding protocol="http" bindingInformation="*:55611:localhost" />
  3. Add an additional binding to allow connections to this port from any other machine:
    <binding protocol="http" bindingInformation="*:55611:*" />
  4. Be sure to restart IIS Express in order for the changes to be enabled.

Step Three: Configure HTTP.SYS at the kernel level to allow incoming connections from outside your computer.

  • From a command prompt with administrative rights:
    netsh http add urlacl url=http://*:55611/ user=Everyone

Step Four: Configure the Windows firewall to allow incoming connections.

  • From a command prompt with administrative rights:
    netsh advfirewall firewall add rule name=”IISExpressWeb” dir=in protocol=tcp localport=55611 profile=private remoteip=localsubnet action=allow

Step Five: Verify that it works.

  1. Ensure that your development machine and the iPad are connected to the same wireless network.
  2. Determine your development machine’s IP address.
    • From a command prompt with administrative rights: ipconfig
    • Look for the adapter that corresponds to the wifi network that the iPad is on.
    • Your development machine’s IP address is listed as “IPv4 Address.”
  3. Open Safari on the iPad and type the following address: http://DEV-IP:55611/, where “DEV-IP” is the IP of your development machine.

Working with SSL at Development Time is easier with IISExpress
Using IIS Express to host a website (temporarily)

Special thanks to Eric Honour for reviewing this content.