I've following service, defined as OneWay, because it's long running (a few minutes) and I can't wait when it finishes (it's used in ASP.NET application).
The problem is that if I call client.Dispose() after the service call, it blocks and after 60s timeout expires with exception.
How should I dispose the client in such scenario? Increasing the timeout of the service isn't solution, because I can't wait so long time with the HTTP request of the web page, where it's used.
[ServiceContract]
public interface IMyService
{
[OperationContract(IsOneWay = true)]
void BeginRun();
}
var client = new MyServiceClient();
client.BeginRun();
client.Close(); //This leads to time-out, how and when to call it?
Thanks for tips.