First let me say this used to work in Visual Studio 2015 but I am having the a darn hard time getting it to work in Visual Studio 2017.
I have a WebAPI project running in Visual Studio 2017. I have edited the applicationhost.config file in the …\ProjectName.vs\config file so it has the following entries for my project.
<bindings>
<binding protocol="http" bindingInformation="*:56952:localhost" />
<binding protocol="http" bindingInformation="*:56952:192.168.1.155" />
</bindings>
My firewall is completely disabled. When I try to run my Xamarin forms project on a Win10 Mobile V10.0.15254.0 emulator my app does not connect to the WebAPI. (I get the standard "The text associated with this error code could not be found. A connection with the server could not be established."
If I launch Edge on the emulator and try to access any of my local servers on the network using IP address, that works. Can someone enlighten me with regard to what has changed and how I can now make this work?
So the issue was the IP address I was using. Here are the steps I used to resolved this:
Within the
<bindings>section of the entry for your WebAPI project, add a binding for the IP address you copied from in step 4. It should look something like this:Where 56952 is the port my IIS Express is hosting the WebAPIs on and 169.254.69.220 is the IP address I copied from step 4.
After adding this, I was able to connect to locally hosted WebAPIs in IIS Express.
Hope this helps.