- 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?