把Stream 保存到客户端
//读取下载的文件流
if (fileStream.CanRead)
{
int length;
byte[] buffer = new byte[10000];
length = fileStream.Read(buffer, 0, 10000);
long dataToRead = fileLength;
if (!Directory.Exists(@"c:\downFile"))
{
Directory.CreateDirectory(@"c:\downFile");
}
FileStream fstr = new FileStream(@"c:\downFile\" + _FileName, FileMode.Create, FileAccess.Write);
fstr.Write(buffer, 0, length);
fstr.Close();
MessageBox.Show(@"File has been downloaded to c:\downFile\! ",
"RHDB - about Attachment", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}