I have a webservice through which I can upload documents to our ASP.NET web site. The problem is when I upload PDF & word documents, they get corrupted when I try to open them. Text documents always upload fine. What is even strange is that on my development machine, these files upload fine but when I try to upload to our demo site, they get corrupted.
Any ideas?
my code is of the format:
WebServicesSoapClient proxy = new WebServicesSoapClient();
byte[] data = GetFileByteStream("C:\\temp\\sample.pdf");
string response = proxy.UploadDocument("james", "password",
orderId, "Sample.pdf", data, true);