Reputation: 2269
I've written a pair of applications, using WCF for a client/server connection between them. Part of the functionality is that the client will download (potentially very large) files across WCF. Everything works fine.
I'm using basicHttpBinding, and have my sendTimeout and receiveTimeout set to a couple of minutes. The trouble I have is, if I set my timeouts to be smaller, then they don't allow enough time for a large file download (especially across a slow network). If I leave the timeouts as is, then I have to wait a long time when I get a dropped connection.
Is there a better way for me to deal with this issue, that still allows me to download the files over WCF?
EDIT: In addition to the answer from luksan, I found a lot of useful information on this previous post: Timeouts WCF Services
Upvotes: 3
Views: 829
Reputation: 7757
Have you tried setting the SendTimeout
to a large value and leaving the ReceiveTimeout
as is? I think SendTimeout
times out a long-running operation whereas ReceiveTimeout
times out an inactive channel.
Upvotes: 3