
Step One: Ensure that you are using IIS Express.
- Right-click on the web project within Visual Studio 2012’s Solution Explorer and choose “Properties”.
- 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.
- 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
- 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" />
- Add an additional binding to allow connections to this port from any other machine:
<binding protocol="http" bindingInformation="*:55611:*" />
- 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.
- Ensure that your development machine and the iPad are connected to the same wireless network.
- 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.”
- From a command prompt with administrative rights:
- Open Safari on the iPad and type the following address: http://DEV-IP:55611/, where “DEV-IP” is the IP of your development machine.
References:
• 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.