Can't access WEB API with ip:port but can with localhost:port during VS debug mode

后端 未结 5 1821
天涯浪人
天涯浪人 2020-12-08 02:45

I am trying to write an WEB API from .net and trying for my Android Application to query some data from the sql server database.

I have the web api written and it wo

5条回答
  •  一生所求
    2020-12-08 03:13

    Both Anton and Matthew's Answers pointed me to the right direction

    So this what I did

    1. Run Visual Studios in administrator mode

    2. Changed the binding protocols and allow for incoming directions as suggested http://johan.driessen.se/posts/Accessing-an-IIS-Express-site-from-a-remote-computer

      But after that, I have a service unavailable (503) error

    3. So I followed this : IIS Express Enable External Request - 503 Added just the port protocol and port:ip protocol,

    Than it works both on my machine's browser and on my phone.

    Not too too sure why the 3rd step is needed -my hypothesis is (the localhost url is needed for VS to point to and the ip url is used for accessing from another machine)

提交回复
热议问题