0

I want to learn socket programming in C#, and related settings. I've download a demo from a site. when i set Remote Host IP address to my local address it connect to server (my pc) and send receive works.

enter image description here

however when i set Remote Host IP address to my router external IP, i doesn't connect and throw exception: "No connection could be made because the target machine actively refused it 91.99.166.161:300"

enter image description here

i set port forwarding in my router. what's wrong? Thanks in advance.

r.zarei
  • 1,261
  • 15
  • 35

1 Answers1

0

Either your port forwarding configuration is incorrect, there's a firewall in the way, or the host you're forwarding to is not listening on the destination port.

Tom Shaw
  • 660
  • 3
  • 7
  • I've disable firewall. this is my port forwarding configuration: external port start:300 , external port end:300, internal port start:300 , internal port end:300 , protocol: tcp , Server IP Address:192.168.1.2, and I've started listening – r.zarei Jun 01 '11 at 12:43
  • If you want to add more details, please edit your original question. – Tom Shaw Jun 01 '11 at 12:45