By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,567 Members | 1,713 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,567 IT Pros & Developers. It's quick & easy.

Socket Exception question..

P: n/a
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.
Nov 16 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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?

Nov 16 '05 #2

P: n/a
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.

"Claire" wrote:
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?

Nov 16 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.