void Button1_Click(object sender, EventArgs e) { object obj1 = HttpContext.Current.Items["a"]; if (FileUpload1.HasFile) { byte[] arr = FileUpload1.FileBytes; Response.Write(FileUpload1.FileName.Trim()); localhost.Upload upload = new localhost.Upload(); localhost.UploadRequest request = new localhost.UploadRequest() { FileBytes = arr, SaveVirtualPath = "/Account/" + Guid.NewGuid() + FileUpload1.FileName }; // localhost.UploadSoapHeader header = new localhost.UploadSoapHeader { //AuthKey = "niejunhua" }; upload.UploadSoapHeaderValue = header; localhost.UploadResult rs = upload.CallUpload(request); Response.Write("code=" + rs.Code + "<br>"); Response.Write("Msg=" + rs.Msg + "<br>"); } }