Note that there are some explanatory texts on larger screens.

plurals
  1. POWCF file transfer with cancellation support
    primarykey
    data
    text
    <p>There are a lot of questions regarding file transfer with WCF. I've got everything working, including larges files in "chunked" mode. I have the option to cancel the file upload from the sending party (the one that starts the upload) and a callback interface to notify when the transfer is accepted, and canceled.</p> <p>My problem is cancelling the the upload from the receiving end. I can just force the channel to close, but i would like to notify the sending party of the cancellation. I'm not getting a solution for this. Any help?</p> <p>Thanks</p> <p>Update:</p> <p>I already figured it out. See the comment below. The service interface looks like this:</p> <p>By the way, the service interface looks like this:</p> <p><code></p> <pre><code>[ServiceContract(SessionMode = SessionMode.Required, CallbackContract = typeof(IFileTransferServiceCallback))] public interface IFileTransferService { [OperationContract(IsOneWay = true)] void RequestSendFile(FileTransferInvitation request); [OperationContract(IsOneWay=true)] void SendData(string id, byte[] data, int length); [OperationContract(IsOneWay = true)] void SendCancel(string id); [OperationContract(IsOneWay = true)] void SendEnd(string id); [OperationContract(IsOneWay = true)] void RequestSendCancelConfirmed(string id); } public interface IFileTransferServiceCallback { [OperationContract(IsOneWay = true)] void SendStarted(FileTransferInvitation transfer); [OperationContract(IsOneWay = true)] void RequestSendCancel(string id); [OperationContract(IsOneWay = true)] void SendCompleted(string id, Exception error); } </code></pre> <p></code></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload