Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > .net remoting and tcp listener socket

Reply
Thread Tools

.net remoting and tcp listener socket

 
 
Danish Ahmed
Guest
Posts: n/a
 
      04-20-2005
Hi,

I am using .net remoting with tcp channel and a tcp socket for accepting
connections in a console application. When I run the application first time
everything works fine but if I run the application again I get only one
usage of socket address exception when 'bind' of listener socket is called.
This only occurs if a client is connected to application in the previous
run. Remoting and socket are using different ports, I have also make sure
that socket is closed and tcp channel is unregistered on application
shutdown. Any ideas why listening port remains open ?, I am using .net
framework 1.1.

Regards

Danish Ahmed




 
Reply With Quote
 
 
 
 
Ivan Zuzak
Guest
Posts: n/a
 
      04-21-2005
Danish Ahmed wrote:
> Hi,
>
> I am using .net remoting with tcp channel and a tcp socket for accepting
> connections in a console application. When I run the application first time
> everything works fine but if I run the application again I get only one
> usage of socket address exception when 'bind' of listener socket is called.
> This only occurs if a client is connected to application in the previous
> run. Remoting and socket are using different ports, I have also make sure
> that socket is closed and tcp channel is unregistered on application
> shutdown. Any ideas why listening port remains open ?, I am using .net
> framework 1.1.


hi,
the OS doesnt release the socket from that IPORT right after you close
the application. it takes some time (a minute or two).

so, look at the Channel and Formatter Configuration Properties in the
MSDN, and find the "exclusiveAddressUse" property. this will solve your
problem.
 
Reply With Quote
 
 
 
 
Danish Ahmed
Guest
Posts: n/a
 
      04-21-2005
Thanks for the reply Ivan, I set the 'exclusiveAddressUse' for both tcp
channel and listener socket but the problem is still occurring, one thing I
have notice is that this problem only occurs if some client connects to
listener socket also if I remove to remoting code from the application
listener socket starts working perfectly.



Regards

Danish Ahmed


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
send tcp raw socket (bogus tcp header length) Tiger C Programming 5 05-01-2006 05:53 AM
How to implement a GUI for TCP Listener jclark101@gmail.com Java 1 08-15-2005 08:43 AM
Problem with TCP Channel already registred .net remoting (.net 1.0, IIS) Martijn Damen ASP .Net 0 06-16-2004 11:03 AM
Remoting.Channels.Tcp Bill Bush ASP .Net Web Services 0 05-15-2004 01:56 AM
TCP Listener on Windows XP Colin Robbins Perl Misc 4 10-09-2003 05:34 PM



Advertisments