Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Wednesday, March 30, 2011 9:04 AM
I am using W7 and VS 2010 for a web project and when i hit F5 the project starts in debug mode and http://localhost (using port 80) appears in the bowser's url.
In my router I have made forward/open for external access to port 80 mapped to my PC's local IP which is 192.168.1.2. Now, I have tried to disable both the router's firewall + Window's firewall.But all attempts to access my web project (debug purpose) from the outside completely fails...
The router uses an dynamic assigned IP address
Also the file: C:\Windows\System32\drivers\etc\hosts it says:
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
What can I do to solve this problem? Do I need to do anything in the IIS?
I don't think there is anything wrong with the router since I am runing other softwares that opens/uses various ports like e.g Skype etc.
Thanks
All replies (6)
Thursday, March 31, 2011 2:53 AM âś…Answered
Thanks, will do
Wednesday, March 30, 2011 9:11 AM
How do you access the website from the outside (what URL, localhost will not work, that references the local computer you are using)?
What is the issue? You cannot connect? You get an error message from IIS? Something else?
If you cannot establish a connection, your ISP may block port 80. Some of them do this. Either talk to your ISP, or try to run it on a different port (works sometimes, depends on how your ISP has this set up).
Wednesday, March 30, 2011 10:58 AM
Thanks for a quick reply.
Yes, you are right, some ISPs do block certain ports (e.g 80) but I have tried various random ports and nothing works. And also my ISP claims they don't.
Additional observations:
- Works fine to ping my router's dynamic IP from an outside computer.
- Another program I am using uses another port, in this case 63231, which is also forwarded in the router. However, when using e.g. a service like http://www.canyouseeme.org/ to check this port, the message is also "no connection" as with e.g. port 80, UNTIL the actual software is started in the Windows 7. Then the message say "connection OK". Obviously the software cannot access the router so I can only draw the conclusion that it changes some setting in Windows 7..?
- I do not use the IIS7 (but I do have it installed.)
Whan trying to access from outside I use (example IP) e.g. http://123.45.12.12:80 (or other various ports)
But since the 'localhost' apparently is mapped to 127.0.0.1 (as above) I realize it won't work until the mapping localhost -> 192.168.1.2. But FIRST I need to get a port that works from outside....
Thanks
Wednesday, March 30, 2011 11:22 AM
Hmm, i thought you used IIS, but my understanding now is that you use the web server in Visual Studio (Cassini). Is this correct?
I remember there were a few limitation of the web server in prior Visual Studio versions, one of them was that it would not accept remote request (that is, you can only access it on the machine itself).
I do however not know if this is also true for VS 2010.
If you are using the web server in VS 2010, you may want to check if it is possible to access it remotely, with a question in the VS forum:
http://forums.asp.net/1213.aspx/1?Visual+Studio+and+Visual+Web+Developer+Express
They should know the limitations better.
Wednesday, March 30, 2011 3:44 PM
OK, thanks.
But, I think the problem is two fold:
1) Must be able to get a port open (e.g. 80) externally and mapped correctly to my local PC's local IP 192.168.1.2.
2) Get the VS2010 web server to map localhost to this port. It seems it only maps to 127.0.0.1 (by default) and I have no idea on how to change this to my local IP.
Right now I am stuck on both issues.
Thursday, March 31, 2011 12:42 AM
The server you mention may not identify that port 80 is open, if nothing is listening and responding on that port. It depends how it performs the port scan.
I think the big issue is 2), and at this moment we should focus on that. Try the other forum and see if they have any idea. Once you get this working, we can continue to help you if you need more help.