Click here to Skip to main content
15,889,863 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello!

I have a problem with my own program.

Source for server:
MSIL
mainServer.ServerBindIPAdress = "my ip address";
            mainServer.ServerBindPort = 1897;


Source for client:
mainClient.Connect("my ip adress", "1897", false);


Now when I try to connect it's just throw an exception that the server couldn't respond in time.

I have opened the 1897 port in my router. Pics:http://img696.imageshack.us/img696/1992/portok.png[^]

OS:windows 7
used program:Microsoft Visual studio c# 2008

PS.:On network it works perfectly, and so on localhost.
Posted

1 solution

If i got this right you want your client software to connect to your server software through your router from outside of your network?

If that is the case you need the client to connect to your server side external ip adress(you can get it here http://www.whatismyip.com/[^]), then you have to forward the port from the router to your computer.
 
Share this answer
 
Comments
Roger Wright 6-Sep-10 1:27am    
Reason for my vote of 5
I think it nails the problem on the head - good answer.
Roger Wright 6-Sep-10 1:29am    
It looks like he has the port forwarding configured, if I'm interpreting the Virtual Server Address correctly in the image supplied. But his client has to access it via the WAN port IP address of the router to invoke the port forwarding function. Good call!
Per Söderlund 6-Sep-10 1:34am    
I try to keep it simple and straight forward :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900