Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / April 2006

Tip: Looking for answers? Try searching our database.

Returning large number of results from a WS

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
kamran - 02 Apr 2006 12:47 GMT
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.
Josh Twist - 03 Apr 2006 08:34 GMT
Hi Kamran,

Can I ask why you want to deliver the data in chunks rather than in one
go?

Remember, usually, the less negotiation (opening connections, making a
request to IIS etc) that has to go on, the better?

Josh
http://www.thejoyofcode.com/
kamran - 04 Apr 2006 16:36 GMT
Hi,

thanks for the reply, I'm trying to do this because it takes a lot of time
to get that amount of data and I want the client to be able to cancel it
after receiving some portion of the data if he chooses to do so.

I must get the solution for this.

regards,

Ab.

> Hi Kamran,
>
[quoted text clipped - 6 lines]
> Josh
> http://www.thejoyofcode.com/
Josh Twist - 04 Apr 2006 17:21 GMT
Hi Kamran,

I replied to a similar post a while back where the OP needed to write a
cancellable Web Service. Maybe this can work for you also? Please bear
in mind that this is a very simplified example.

http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet.webservi
ces/browse_thread/thread/3048c99e62626d13/79dffb199ec04236?lnk=st&q=&rnum=32#79d
ffb199ec04236


Josh
http://www.thejoyofcode.com/

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.