C
Join ServerC#
help
❔ Locally-hosting my site, cannot view on phone (MVC)
MMC_20181/26/2023
Hello, I just started an MVC site and have a starter project, and want to get it to appear on my phone; however, whenever I run the program, my phone can't find the site. The application URL is localhost:7117, my Wireless IPv4 address is 192.168.0.39, and both devices are on the same network, so I would expect 192.168.0.39:7117 to work, but it doesn't. I am almost positive that my network isn't the issue, because if I go to run an old Node.js project of mine on port 3000, my phone will connect. Is there anything I'm missing? Attached is an image of my launchSettings.json, in case that helps any.

AAngius1/26/2023
Use something like Ngrok
AAngius1/26/2023
That'd be easiest
Ttebeco1/26/2023
if you're exposing on localhost it means that it cannot be reachable from somethign that is not on that same address
Ttebeco1/26/2023
so anyclient (your phone) that don't have the ability to hit the same network ip "localhost"
Ttebeco1/26/2023
which by definition is impossible
Ttebeco1/26/2023
WIFI or not
Ttebeco1/26/2023
listening on "localhost" make it completly inacessinble on the network
Ttebeco1/26/2023
you need to listen on an IP that is one of the multiple IP or your computer
Ttebeco1/26/2023
AND that IP must be reachable
Ttebeco1/26/2023
so if you say you're device are all on the same LAN
Ttebeco1/26/2023
check their respective IP and submask
Ttebeco1/26/2023
check if the sub mask is compliant
Ttebeco1/26/2023
and use that IP
Ttebeco1/26/2023

Ttebeco1/26/2023
you'd need to put that IP here FOR DEV ONLY PURPOSE
Ttebeco1/26/2023
because that file will not be read outside local dev
AAccord1/27/2023
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.