-1

With my app running locally (in Visual Studio), I can hit a REST method within it from Postman using either of these URLs:

http://shannon2.nrbq.ad:21609/api/inventory/sendXML/duckbill/platypus/poisonToe.xml
http://localhost:21609/api/inventory/sendXML/duckbill/platypus/poisonToe.xml

So localhost and the machine name both work.

But since I wasn't able to reach the method when calling it from a handheld device connected to my PC, I thought moving the server (REST) app to another machine on the network would clear up that problem.

However, not only can I not reach the REST method from the handheld, I can't even reach it from Postman! I get a "Could not get any response" response in Postman using any of the following URLs; I've tried, I think, every possible permutation:

https://martienda.nrbq.ad/api/inventory/sendXML/duckbill/platypus/test.xml
https://martienda.nrbq.ad:21609/api/inventory/sendXML/duckbill/platypus/test.xml
https://martienda.nrbq.ad/ccr.api/api/inventory/sendXML/duckbill/platypus/test.xml
https://martienda.nrbq.ad:21609/ccr.api/api/inventory/sendXML/duckbill/platypus/test.xml

https://199.96.39.231/api/inventory/sendXML/duckbill/platypus/test.xml
https:/199.96.39.231:21609/api/inventory/sendXML/duckbill/platypus/test.xml
https://199.96.39.231/ccr.api/api/inventory/sendXML/duckbill/platypus/test.xml
https:/199.96.39.231:21609/ccr.api/api/inventory/sendXML/duckbill/platypus/test.xml

...and none of them work (they all respond with the utterly demoralizing "Could not get any response"). What gives? What takes? Why all the hissing snakes? (apologies to Wm. Blake)

Note: If I use "http" instead of "https", I get a "404 - File not Found" error when using the IP Address (but still get "Could not get any response" when using the machine name).

Note: the REST app I can hit when the REST app is run locally is in CCR.API.Controllers and is decorated thus:

[Route("api/inventory/sendxml/{userId}/{pwd}/{filename}")]

Why has the server gone on strike?

B. Clay Shannon-B. Crow Raven
  • 8,547
  • 144
  • 472
  • 862

1 Answers1

2

Looking at URLs it seems you are hosting your application in either Visual Studio development web server or IIS express. (not necessarily true though). If its either dev server or IIS express then

  1. With VS Dev server you will not be able to access urls/app from other machine but where it is hosted. See this link
  2. If you are using IIS Express then you need to enable remote access. See this link
  3. If you are hosting it in IIS then check firewall settings.
Community
  • 1
  • 1
Pankaj Kapare
  • 7,486
  • 5
  • 40
  • 56