JL.
JL.

Reputation: 81342

WCF service question

With traditional ASMX web services synchronous request, the client connects, makes a request and waits for the entire message body to be returned.

I was wondering if its possible to have chunks of data flushed back to the client instead with WCF?

This way I can display some progress to the client app during the operation.

Upvotes: 2

Views: 129

Answers (2)

jmservera
jmservera

Reputation: 6682

With WCF you can use streaming for download/upload. Check this links:

WCF Streaming in MSDN

File Transfer Progress example in CodeProject

Upvotes: 2

Maurice
Maurice

Reputation: 27632

Using WCF you can either use streaming or duplex messages to achieve that. Using streaming you are restricted to returning a single stream object. using duplex duplex messaging you pass a callback channel to the server and it can use that channel to make as many calls as you like to the client.

Upvotes: 1

Related Questions