Last post May 20, 2015 06:13 AM by mgebhard
May 19, 2015 10:31 AM|heyitsme|LINK
I am sending large file stream from client to wcf service using tranfer mode as stream with basichttpbinding.
During streaming, if the client loses the network connection , client gets socket timeout exception. But WCF service continues to wait for the stream until the timeout specified. When the network resumes and next call is made to wcf service from the client,
we observe that wcf has not released the previous process and still waiting for the previous response.
Timeouts specified in client and wcf service is as below
opentimeout, closetimeout, sendtimeout, receivetimeout is set to 12 hours.
The file is not released upto 12 hours. Is there any method where we while during reading the stream from wcf, if client is disconnected, terminate the process. I have been struggling from the past 2 days. Please help
May 20, 2015 06:13 AM|mgebhard|LINK
Make sure you have a try..catch..finally block and in the finally block properly close down the WCF client proxy.
Secondly, 12 hours is a very long time to send data over a network and it might be worth your while to find a different solution. For example, send the file in chunks, use a binary protocol, use FTP, or some combination.