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 IP

ORT 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.