This question has been asked before (namely, here), and I've found a few blog posts that give some details about how to setup IIS Express (here and here) in order to allow remote connections, but I haven't been able to put all the pieces together for myself. Here's what I've done so far:
Ran this command at the command prompt to make a "URL Reservation":
netsh http add urlacl url=http://my-computer-name-here:80/ user=everyone
Opened up the appropriate port in my firewall:
netsh firewall add portopening TCP 80 IISExpressWeb enable ALL
Added in a new HTTP binding in my IIS Express's ApplicationHost.config
for my project:
<binding protocol="http" bindingInformation="*:80:my-computer-name-here" />
After completing these steps, I'm able to run my application locally by visiting http://my-computer-name-here/
. However, if I try to visit that address with any other device connected to my local network, I get redirect to my ISP's generic search page.
I also tried navigating to my computer's IP, but I hit a 403 (or a 500 when I navigate to the directory of my project's index.html
, found by examining the "Physical Path" debug information provided in the error message). This happens both locally and on external devices.
What else do I need to do in order to connect to my local IIS Express development server from an external device?
In case it's relevant, I'm using the ASP.NET Web API 2 tutorial as a test project for proof of concept. I'm using Visual Studio 2013.
I've found that I am able to connect to the development server externally, but only from another Windows machine. The devices I was using to test for a remote connection (an Android phone, an iPad, and a MacBook Air) are all unable to view the application.
I've asked a new question regarding accessing the application from non-Windows machines here.