private void button_Click(object sender, RoutedEventArgs e) { DownloadService.DownloadServiceClient client = new DownloadService.DownloadServiceClient(); DownloadService.File file = client.DownloadDocument(); System.IO.File.WriteAllBytes(@"C:\MicrosoftTechnology\TFS\WCF\InterviewPreparation\14_P35_MTOMMessage\DownloadedFile\" + file.Name, file.Content); MessageBox.Show(file.Name + "Downloaded"); }