Socket Exception question..

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I'm writing a client/server app.

I want to run my server on "Windows Server 2003" PC.

This PC has two network cards. 1 for Internet and other is plugged into
a switch. My plan is that I'll connect 2 or 4 PC to the switch and the
server
PC will give out DHCP IP address.

I have configured DHCP server and set the IP range, for example,
192.168.1.0-192.168.1.10. and subnet mask is 255.255.0.0. It seems that
DHCP is doing its job. I mean, when I conneted 2 PC to the switch, they are
getting valid IP addresses, for example, 192.168.1.1, 192.168.1.2. and they
can ping each other as well.

However when I run my server on the server with IP for example,
192.168.1.0, and client on 192.168.1.1/1.2, I'm unable to connect.
I'm getting socket exception with additional information saying the remote
server actively refused the connection..

Could you please let me know where did I stuff up.


Cheers,

Naveen.
 
Sounds like a pretty normal LAN setup to me
If error message says the remote server actively refused connection, then
are you sure your server has opened the port and is listening?
Checked the ports are open with command prompt netstat -an?
Checked that software firewall isn't blocking the port?
Checked that client and server ports are using the same protocol (tcp/udp
etc)
Checked that client is attempting to connect to correct port?
 
Hi,

Thanks for your post.

My code wasn't opening the port at all when I used "netstat -an".
I could fix the problem. Now my prog is working fine.


Cheers,

Naveen.
 
Back
Top