Reputation: 3270
I have an asp.net web application, I wanted to test the site from my other computer(connected to the same router as mine). I tried to access it from localhost:7927 (the port my web is running at) but can't connect. What do I have to do in order to connect my web from my other comp? Let me know if anything is incomprehensible. Thank you.
Upvotes: 0
Views: 2071
Reputation: 9794
You need to write your ip address instead of localhost.
Example:
http:// 192.168.1.100:7927
If you don't know your ip adresss: From command prompte, write ipconfig and you will see there.
Upvotes: 0
Reputation: 219077
You tried localhost:7927
from which computer?
If the application is running on Computer A, then Computer A can access it with localhost:7927
. That's because it's running on the local host.
Computer B, however, needs to use the access of Computer A. If you try to use localhost
on Computer B, it will look for the application on Computer B.
You need to determine what the IP address is for Computer A. For example, if that address is 192.168.0.2
then Computer B would access the application at 192.168.0.2:7927
.
localhost
is an alias for the current local computer's IP address. It doesn't work across different computers. A computer can access its own local IP address, but it's often easier just to use the localhost
alias.
It's possible that Computer B won't be able to access the application on Computer A for other reasons as well. If one of them is running a firewall that blocks access, for example. If that's the case, you're going to have to look into it on your end.
Upvotes: 2