protected void Button1_Click(object sender, EventArgs e) { //UpLoadService.UpLoadServiceClient ser = new UpLoadService.UpLoadServiceClient(); //System.IO.Stream stream = FileUpload1.PostedFile.InputStream; //ser.UploadFile(FileUpload1.PostedFile.FileName, "pppp", stream); //UpLoadService.FileUploadMessage request = new UpLoadService.FileUploadMessage(); //Console.WriteLine(FileUpload1); if (batchRequest == null) { batchRequest = new BatchRequest(); } byte[] bytes = new byte[FileUpload1.FileContent.Length]; string Str1 = System.Text.Encoding.Default.GetString(FileUpload1.FileBytes); byte[] byteArray = System.Text.Encoding.Default.GetBytes(Str1); FileUpload1.FileContent.Read(bytes, 0, bytes.Length); batchRequest.OnBatchRequestProcesEvent += batchRequest_BatchRequestProcesEvent; batchRequest.SendBuffer(byteArray, FileUpload1.FileName, 1024000); //UploadArr(FileUpload1.FileContent, FileUpload1.FileName,1024); //request.FileName = FileUpload1.FileName; //request.SavePath = "ooooooo"; //request.Tranter = 6; //request.FileData = FileUpload1.FileContent; //request.length = 1024 * 1024; //UpLoadService.IUpLoadService channel = ser.ChannelFactory.CreateChannel(); //channel.UploadFile(request); }