I have a service that use tcp, and all my methods are async so I implement the Begin/End methods (I use C# 4.0).
If I only modified my app.confing to set transfer mode as Streamed instead of Buffered, when I make the async call in the client, the application wait forever the response. However, if I change the transfer mode to Buffered, then it works fine.
Also I notice that I need to use a reliableSession in Buffered transfer mode because when I start the application, I get the error 10061, that the destination service refuse the connection actively.
I know that if I want to use the streamed transfer mode I need no disabled de reliableSession, so I am asking if it is possible to use the streamed transfer mode with async methods.
Thanks.
EDIT: I am trying to transfer a 5MB file. However, this is a test, because in production, the files can be larger, so I would like to be ready for future needs.
The answer is yes, you can use streamed transfer mode on your asynchronous methods. The bellow link will take you to an MSDN article which describe the necessary steps you have to take in order to achieve streaming functionality using asynchronous methods.
The following post should clarify your situation: http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/4893f3c9-2a38-462f-b49c-afa833a3760a/
Also, a different article explains in details and with code samples how you can create a self hosted REST WCF service which provides functionality for uploading/downloading large files using streaming mode and asynchronous methods. You can achieve same thing using a SOAP based service. The configuration related things are set your transfer mode to streamed and increase the timeout value. For a full implementation sample check this link: http://www.level533.com/2010/11/uploading-large-files-to-self-hosted-wcf-rest-service/
P.S: I can't provide all the content in this answer, otherwise this would become a fully fledged article.