Search code examples
wcfasynchronousstreamingchunkingchunks

cancel stream request from WCF server to client


I posted about stream request here
[wcf-chunk-data-with-stream]:WCF chunk data with stream
I solved that task but now when i close request in client part server continue to send data. is it possible to cancel stream request from WCF server to client?


Solution

  • you could Abort instead of closing proxy if you want to cancel. Make sure you handle the exceptions on the server side.

    I usually do somehting like :

    
       serviceClient.Abort();