//利用“BinaryWriter”对byte[]进行保存
string strUrl = System.Web.HttpContext.Current.Server.MapPath(strUpPath + @"/" + FileName + ext);
System.IO.FileStream fs = new System.IO.FileStream(strUrl, System.IO.FileMode.Create, System.IO.FileAccess.Write);
System.IO.BinaryWriter bw = new System.IO.BinaryWriter(fs);
bw.Write(bytes);
bw.Flush();
fs.Flush();
bw.Close();
fs.Close();