winforms - How to call progress bar defined in wcf service - c# -


i have client(winforms application)/server (wcf service) doing complex logic writes packets remote host - process takes 20 minutes write specific point not complete. want show progress , attempt continue last stopped in client application in form of progress bar.

  //service:   public class serviceimplementation: iserviceinterface{     progressbar pgbar = new progressbar();    public void complexfunction(byte[] data_to_send, uint32 start_addr){      pgbar.maximum = data_to_send.length;      for(int = 0; < data_to_send.length; += 64){       //do logic      }       pgbar.value = i;    }  }   //client   private void btnprogcomplexfunction_click(object sender, eventargs e){      callcomplexfunction   }    void callcomplexfunction(){      serviceimplementation.serviceimplementationclient proxyinstance = new      serviceimplementation.serviceimplementationclient();      //i attempted doing following doesn't work because progress bar returns integer (e.g pgbar.value = 100;). problem lies here. have been cracking skull 2 days straight     pgbar.value = proxyinstance.complexfunction(data_to_send, start_addr);} 

you need async call web service. need soap client this. can achive download progress feature this.

you can check article.

http://shenoyatwork.blogspot.com.tr/2006/10/showing-download-progress-with-net.html


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -