So I just encountered this very weird bug. I developed an entire Web API in Visual Studio 2013. All works fine. Now the API is used by an android app I develop myself, so when I want to make an update to the API, I test this locally.
Now I already know that an emulator runs on localhost, and so does the ASP.NET WebApi, so to access my local API from the emulator, I use my ip4
address (192.168.2.3). This works fine when running the API from Visual Studio 2013.
However, when I run the API from Visual Studio 2015, it doesn't work anymore.
- Browsing to localhost:2664 works without problems, able to call all the endpoints on both vs2013 and vs2015
- In the browser browsing to
192.168.2.3:2664/v1/...
only works when running API from Visual Studio 2013. - Using
10.0.2.2
that many suggested didn't work ether (on both). - No changes made to the API code, I can re-run from visual studio 2013 or 2015 any time, problem stays the same.