Exemplo n.º 1
0
 protected void OpenChannel()
 {
     if (downloadChannel == null || !(downloadChannel.State == CommunicationState.Opened))
     {
         BasicHttpBinding downloadBinding = GetBasicHttpStreamBinding();
         EndpointAddress  address         = new EndpointAddress(string.Format("http://localhost/webservices/CoreService2011.svc/streamDownload_basicHttp", Environment.MachineName));
         downloadChannel = new StreamDownloadClient(downloadBinding, address);
     }
     downloadChannel.Open();
 }