0
  • Server 1 - MyWebAPI.com (Forms Web API VB.NET 4.7.2 MSVS 2019)
  • Server 2 - MyMainSite.com (Forms ASP.NET 2.0 MSVS 2005)

I want to call API on MyWebAPI.com from MyMainSite.com

Web API call:

http://www.MyWebAPI.com/api/data?ID=100&cat=DEF&format=json

The link above works fine in a browser address bar.

When I did his in testing from localhost MyMainSite.com to MyWebAPI.com it all worked fine.

But when I do this via code from MyMainSite.com, I get error:

Unable to connect to remote server

What do I have to do in MyWebAPI.com to turn on remote access for the API?

My MyMainSite.com pulls data from lots of APIs so it can be this site.

Any ideas?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
icm63
  • 59
  • 3
  • Maybe a Firewall rule? Are you able to access your created end point on (MyWebApi.com) from outside of your network, maybe on your cell phone? – Ramp2010 Nov 15 '22 at 22:29

0 Answers0