471,627 Members | 2,356 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,627 software developers and data experts.

Implementing progressbar for large webservice transfers

I've got some code which uploads files from a client to a webservice
(using an byte array).

Anyone got a suggestion how to implement a progressbar indicating amount
of bytes that's been sent in the ongoing call to the webservice?

(I would prefer not to have to split up the files into 4kb chunks just
to be able to implement this progressbar.)
Feb 7 '06 #1
3 2539
Hi,

"John Nossluap" <no******@nodomain.com> wrote in message
news:O7****************@TK2MSFTNGP10.phx.gbl...
I've got some code which uploads files from a client to a webservice
(using an byte array).

Anyone got a suggestion how to implement a progressbar indicating amount
of bytes that's been sent in the ongoing call to the webservice?

(I would prefer not to have to split up the files into 4kb chunks just to
be able to implement this progressbar.)


Do you use a buffer to read the file into and later send this buffer to the
remote end , all this inside a cicle?
if so you could do it , just remember that you have to do this transfer in a
worker thread and invoke the event in the main thread.

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Feb 7 '06 #2
Ignacio Machin ( .NET/ C# MVP ) wrote:
Hi,

"John Nossluap" <no******@nodomain.com> wrote in message
news:O7****************@TK2MSFTNGP10.phx.gbl...
I've got some code which uploads files from a client to a webservice
(using an byte array).

Anyone got a suggestion how to implement a progressbar indicating amount
of bytes that's been sent in the ongoing call to the webservice?

(I would prefer not to have to split up the files into 4kb chunks just to
be able to implement this progressbar.)
Do you use a buffer to read the file into and later send this buffer to the
remote end , all this inside a cicle?


Yeah, I've copied the file in to a byte array and am providing this byte
array to the webmethod of the web service. Not sure what you mean by a
circle since I only make one call to the webservice.
if so you could do it , just remember that you have to do this transfer in a
worker thread and invoke the event in the main thread.


Ok, how :)? Rember I'm interested receiving information about the amount
of bytes that currently been sent during the ongoing call. Not just
receiving a notification when the async. call has completed.

Feb 8 '06 #3
Hi,


Yeah, I've copied the file in to a byte array and am providing this byte
array to the webmethod of the web service. Not sure what you mean by a
circle since I only make one call to the webservice.


A loop I meant, but if you are sending the entire file in a unique operation
you cannot use a progressbar, you will have to split it.
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Feb 8 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by needin4mation | last post: by
4 posts views Thread by Weston Weems | last post: by
1 post views Thread by nobody | last post: by
6 posts views Thread by Sam | last post: by
reply views Thread by Willem_at_work | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.