tags:

views:

56

answers:

2

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.

+1  A: 

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.

Maurice
+1 and accepted answer, because duplex messaging is the way to go.
JL
+2  A: 

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

WCF Streaming in MSDN

File Transfer Progress example in CodeProject

jmservera
@jmservera and Maurice, thank you both for your great answers, but I've just realised something that could potentially solve my problem... before with traditional asmx I really did have just a standard client / server call going on. But now... surely there is nothing stopping me from upgrading my (now converted ) wcf client, into a server in its own right, I could create a netTCP listener in the client - pass through the address in the original server call, then the server can send responses (progress), back via this channel instead? Like the idea?
JL