2

How can I track upload progress of HTTPWebRequest? When I scattered Debug.WriteLines() to track which parts of my code takes the longest time, i found out the function that took the longest time is

var res = req.GetResponse();

I could use BeginGetResponse() but I have no way of tracking progress still? I read from various articles that I should track progress when writing to request stream, but I suppose that happens locally and thus is nearly instantaneous

With WebClient, there is webClient.UploadProgressChanged that allows me to track progress, but I think I can't use MultipartFormData with that? And I can't have multiple uploads at once, not a really big deal tho, in my simple app

How can I then track upload/download progress with HTTPWebRequest then?

Jiew Meng
  • 84,767
  • 185
  • 495
  • 805

1 Answers1

0

you have events for tracking thins in the webclient class

Smith
  • 5,765
  • 17
  • 102
  • 161