[quoted text, click to view] "biztalk2006" <biztalk2006@discussions.microsoft.com> wrote in message
news:29533A51-37F1-4691-BE3F-32B86FFFA6EA@microsoft.com...
> Hello John
> After careful analysis, I have come to the conclusion that the value in my
> static variable is preserved but the socket is becoming inactive meaning I
> am
> not able to send any data over the socket after 30 minutes of inactivity.
> It
> shows as established when I run netstat -na but when I tried to receive
> any
> data it throws me an exception saying that the remote host has forcibly
> closed the connection. This leads me to believe that tcp sockets have an
> idle
> time out . do you have any increasing the idletime out of tcp sockets or
> keeping alive the socket. I was reading on keep alive but it can not be
> used
> for client sockets. Let me know if you have any information on how to
> increase the idle time out of the socket
Actually, I think you're making a mistake with this approach, period.
A web service is not the same thing as a Windows Service. It's not something
that starts up when the system starts, and just keeps running. You should
not expect your socket, or anything else, to just hang around in memory
and/or the process, waiting for something to happen.
You should create a simple Windows Service for this, and connect the two via
..NET Remoting, or WCF. The service won't have any problem with the socket
closing, as the service will always be running.
--
--------------------------------------------------------------------------------
John Saunders | MVP - Windows Server System - Connected System Developer