Reputation: 679
I built an ASP.NET Web API. I run it locally from Visual Studio on IIS Express. I need to access this api from other device from another network, so I understand that it has to be hosted on the development machine on IIS, right? What I read is that:
My dev machine has a public static IP and I can access this Default Web Site successfully from outside.
Upvotes: 2
Views: 8318
Reputation: 36
You should consider your API in IIS just as any IIS App. i.e. a website. It needs to have an IP (or a hostheader value) Lets say api1.example.com binded in IIS with your IIS Application. Your DNS must resolve this to the IIS machine IP. then you can access it in that URL.
You can also just hit the machine IP running the IIS web server (on the port you added for the api - if its not :80) See "Bindings" in IIS
See this Video : https://www.youtube.com/watch?v=I32AnqJzD58
Upvotes: 2