Quantcast
Channel: Security
Viewing all articles
Browse latest Browse all 1881

How to make http requests to your web api hosted in iis from your phone's browser

$
0
0

I have been trying to make web API requests to my asp.net core 2.2 web API that is hosted in IIS. I can get back results when I use 'example.com:50056/api/Vehicle/GetCarpaint' from my browser. However I get 'This site can't be reached' when I make the same request from my mobile phone's browser. Even when I use the IP address of my the machine where the website is hosted. My PC and phone are both on the same network.

Below, I wrote down my finding to this whole situation.

BROWSER

  • example.com --OK
  • example.com:50056/api/Vehicle/GetCarpaint --OK (getting back data)

  • 192.168.8.X:50056 --Error 400 Bad Request -Invalid Hostname

  • 192.168.8.X:50056/api/Vehicle/GetCarpaint --Error 400 Bad Request -Invalid Hostname

PHONE'S BROWSER

  • 192.168.8.X --OK

  • 192.168.8.X/api/Vehicle/GetCarpaint --Error 404 File or directory not found

  • 192.168.8.X:50056 --Error 400 Bad Request -Invalid Hostname
  • 192.168.8.X:50056/api/Vehicle/GetCarpaint --Error 400 Bad Request -Invalid Hostname
  • example.com --This site can't be reached, drsmashservices.com's server IP address could not be found
  • example.com/api/Vehicle/GetCarpaint --This site can't be reached, example.com's server IP address could not be found

I expected to type the IP address of the site with my port followed by my route however my phone's browser can't seem to find the DNS of my website, additionally, I added an inbound rule with port 50056 and I still can't get it to work, am I missing something?


Viewing all articles
Browse latest Browse all 1881

Trending Articles