Hi,
I have a web service that may return a very large amount of data. I want
that data to return in chunks, like first return 10% of data than return the
next 10% and so on, until all is finished. How are other people doing this?
I have come up with the following way:
While inside the webmethod, fetch the data from the db and store it in a
file called "someguid.data" and return the guid. The client will receive a
guid and request again, by calling another method, this time requesting 10%
of this guid. The ws on receiving this guid and the n% requested, willl open
the file and return the n% and close the file again. This way client will go
on requesting until 100% data has been received and the file will be
deleted. I know I'll have to make sure that the file does get deleted at all
costs in diffierent scenerios, but that is another issue to be tackled
later. For now I want this primary task of returning large amount to data to
be completed.
Am I thinking ok ?
Regards,
K.