How to receive large data from a web method and save it to a file?

Posted by Shubham under ASP.NET category on | Points: 40 | Views : 1972
Use System.IO.File.WriteAllBytes
the following exmpl shows how to receive and save a file returned by a web method called GetLargeFile in a web service called MyService by using a WSE proxy obj called MyServicewse

//get data
byte[] fileData= MyServiceWse.GetLargeFile();
// save data
system.IO.File.WriteAllBytes(@"C:\LargeFile.jpg", fileData);

Comments or Responses

Login to post response