E
Eric
Hello,
I have a windows service (written on .NET 1.1/C#) connecting to a webservice
at a specified interval. I have a webreference in my project, create and
instance of this object, and call my webservice methods. The interval was
initially set to 60 seconds and everything was working fine. I changed the
config so that the service is connecting to the webservice every 5 minutes.
This is when i started getting the following error messages: 'The underlying
connection was closed: An unexpected error occurred on a send.'
I did some investigation on this error and used a packet sniffer to see what
is exactly happening. The first time everything is working fine and after
about 2 minutes the connection is reset. (Server sends TCP header with RST
flag). The instance of proxy class (from webreference) does not detect the
connection is reset and tries to connect over the closed connection. This
causes the exception. The next call will succeed (a new connection is
created), the following call will fail again etc. I thought that creating a
new instance of the proxy class at every call and explicitly call Dispose()
would fix my problem but it doesn't. There seems to be some connection
pooling not removing closed connections?
Any idea what causes this behaviour? Thanks in advance!
Eric
I have a windows service (written on .NET 1.1/C#) connecting to a webservice
at a specified interval. I have a webreference in my project, create and
instance of this object, and call my webservice methods. The interval was
initially set to 60 seconds and everything was working fine. I changed the
config so that the service is connecting to the webservice every 5 minutes.
This is when i started getting the following error messages: 'The underlying
connection was closed: An unexpected error occurred on a send.'
I did some investigation on this error and used a packet sniffer to see what
is exactly happening. The first time everything is working fine and after
about 2 minutes the connection is reset. (Server sends TCP header with RST
flag). The instance of proxy class (from webreference) does not detect the
connection is reset and tries to connect over the closed connection. This
causes the exception. The next call will succeed (a new connection is
created), the following call will fail again etc. I thought that creating a
new instance of the proxy class at every call and explicitly call Dispose()
would fix my problem but it doesn't. There seems to be some connection
pooling not removing closed connections?
Any idea what causes this behaviour? Thanks in advance!
Eric