Reputation: 1377
Server socket application falls with SocketException - connection Refused
Is exist limitations on max accepted or open sockets per one application ?
Upvotes: 0
Views: 2626
Reputation: 21644
You're not really giving us enough information to go on.
The number of sockets that can be open concurrently on a single Windows machine is limited by machine wide resources. There are no 'per process' limits that affect the number of sockets that can be open (except, perhaps, some per process non paged pool quotas that might be applied, but I've never come across this in the wild).
I've written about the per-machine limits here on my blog: http://www.serverframework.com/asynchronousevents/2010/12/one-million-tcp-connections.html
There are many reasons that you might get a connection refused error and if you could give us some more information we might be able to narrow down the cause of your problem.
If ALL connections to your server fail with "connection refused" then..
If you manage to connect once but then fail to connect then...
If you get "connection refused" when there are lots of concurrent connection attempts happening, some connections work, some fail, then...
Upvotes: 3