Add Progress Bar to to Your Web Service Client Application

  • Thread starter Thread starter Mark
  • Start date Start date
M

Mark

Hi,

I have been working through this article (), and have encountered a problem
retrieving the length of the stream. I added the following fragment in an
attempt to solve the problem:

intTransferSize = (int) clientMessage.Stream.Length;

However this simply returns 0, until the stream has been read.

Is there any way to access the Http headers as this should expose the
content-length property? Or is there an alternative solution?

Mark
 
Gabriele,

Many thanks for your reply. Did you use the HttpWebRequest object to make
the initial request? If I get this code to work, it will re-coded for the
..net cf. However because I'm pulling back a dataset, I need to be able to
deserialise it. However because of the .net cf's limited support for SOAP,
the only way I know to deserialise it is to make calls on the proxy class.
The problem that I have is that the dataset can take some time to download,
especially on a handheld device. Therefore I would like to present the user
a progress bar, to let them know that something is happening. The only
piece of information that I'm missing is the length of the response. And
because HTTP is the transport protocol I know that this information is there
somewhere.

Mark
 
Back
Top