0

I have a wcf method which connects to tfs server and downloads all the files based on the rootpath to the remote machine.

So I have 17K files and it takes 20 minutes to download and I want the progressbar to report the current status after every for loop present in the wcf service. But ref parameters don't get updated unless the entire method is completed when passed in wcf method.

Is there any other way to do it? I just want to report the status of a current for loop iteration happening in wcf method to my ProgressBar present in my local wpf application.

Vojtěch Dohnal
  • 7,867
  • 3
  • 43
  • 105
Sameek Kundu
  • 147
  • 2
  • 14
  • Use `BackgroundWorker`. See http://stackoverflow.com/questions/5483565/how-to-use-wpf-background-worker – Vojtěch Dohnal Sep 10 '14 at 18:01
  • I already have background worker , and the wcf method is being handled in the do work event , but that method takes 20 minutes to complete , and i am changine a variable there periodically , and i want to get that variable in my local applicaton. if the method is being called locally , passing parameters as ref will do the trick , but the wcf doesn't update the local app of any change in the ref param passed in its method. – Sameek Kundu Sep 10 '14 at 18:04
  • So you need the `WCF` service to report back to your desktop app some progress status as percents completed? – Vojtěch Dohnal Sep 10 '14 at 19:15
  • Did you check http://stackoverflow.com/questions/4683171/progress-notification-in-wcf-for-long-running-processes-how or http://stackoverflow.com/questions/7865537/wcf-informing-about-the-progress-to-client-can-i-use-one-way-call-back-method? – Vojtěch Dohnal Sep 10 '14 at 19:18

0 Answers0