Navigation

Monday, March 09, 2015

How to enable remote access to IIS Express web sites

When developing web services with windows phone applications and using the emulator, Visual Studio provides a rich and integrated development environment.  However, once you move to a physical device, such as a windows phone 8.1 device, for additional testing, you might run into an issue with the device accessing the web service within the IDE.

While you could configure IIS to expose the site you would not have an integrated debugging environment.  However, IIS Express can be configured to expose the IDE website to remote (external) devices.

1.  Turn off or configure windows firewall to allow access to the selected website project port.  You can locate this in the projects properties under web.

image

2.  Navigate to the IIS Express applicationhost.config file. (%HOMEPATH%\Documents\IISExpress\config\applicationhost.config)

3. Find the website you working with (search for the configured port) and add the highlighted line changing localhost to the local ip address that the remote device will use to access the web site.

image

4.  Make sure that you run Visual Studio as an administrator.