客户端
protected void Button1_Click(object sender, EventArgs e)
{
localhost.WebService lws = new localhost.WebService();
//string path=Server.MapPath(
byte[] b = this.FileUpload1.FileBytes;
lws.UploadFile(b, this.FileUpload1.FileName);
}
Webservcie端
[WebMethod]
public void UploadFile(byte[] b,string fileName)
{
System.IO.File.WriteAllBytes(Server.MapPath(".") + "//"+fileName, b);
}