Asp.net(c#)实现多线程断点续传
2008-03-06 10:57
357 查看
System.IO.Stream iStream = null;
// Buffer to read 10K bytes in chunk:
byte[] buffer = new Byte[10240];
// Length of the file:
int length;
// Total bytes to read:
long dataToRead;
// Identify the file to download including its path.
string filepath = @"E:\software\SQL Server 2000 Personal Edition.ISO";
// Identify the file name.
string filename = System.IO.Path.GetFileName(filepath);
try
catch (Exception ex)
finally
{
if (iStream != null)
{
//Close the file.
iStream.Close();
}
Response.End();
}
本解决方案所参考的资料链接列表(在此对作者表示感谢):
http://blog.csdn.net/playyuer/archive/2004/08/02/58430.aspx
http://www.httpsniffer.com/http/1416.htm
http://support.microsoft.com/default.aspx?scid=kb;en-us;812406&Product=aspnet
更新:
此解决方案已根据playyuer 提出的问题作了更新,另外在输出前调用了Response.Clear();方法。
原文出处:http://www.cnblogs.com/bestcomy/archive/2004/08/10/31950.aspx
// Buffer to read 10K bytes in chunk:
byte[] buffer = new Byte[10240];
// Length of the file:
int length;
// Total bytes to read:
long dataToRead;
// Identify the file to download including its path.
string filepath = @"E:\software\SQL Server 2000 Personal Edition.ISO";
// Identify the file name.
string filename = System.IO.Path.GetFileName(filepath);
try
catch (Exception ex)
finally
{
if (iStream != null)
{
//Close the file.
iStream.Close();
}
Response.End();
}
本解决方案所参考的资料链接列表(在此对作者表示感谢):
http://blog.csdn.net/playyuer/archive/2004/08/02/58430.aspx
http://www.httpsniffer.com/http/1416.htm
http://support.microsoft.com/default.aspx?scid=kb;en-us;812406&Product=aspnet
更新:
此解决方案已根据playyuer 提出的问题作了更新,另外在输出前调用了Response.Clear();方法。
原文出处:http://www.cnblogs.com/bestcomy/archive/2004/08/10/31950.aspx
相关文章推荐
- Asp.net(c#)实现多线程断点续传
- Asp.net(c#)实现多线程断点续传
- Asp.net(c#)实现多线程断点续传[转]
- Asp.net(c#)实现多线程断点续传(转)
- Asp.net(c#)实现多线程断点续传
- Asp.net(c#)实现多线程断点续传
- Asp.net(c#)实现多线程断点续传
- Asp.net(c#)实现多线程断点续传
- Asp.net(c#)二进制上传 and 实现多线程断点续传
- Asp.net(c#)实现多线程断点续传
- Asp.net(c#)实现多线程断点续传
- Asp.net(c#)实现多线程断点续传
- Asp.net(c#)实现多线程断点续传
- Asp.net(c#)实现多线程断点续传 .
- Asp.net(c#)实现多线程断点续传
- Asp.net(c#)实现多线程断点续传下载大文件
- Asp.net(c#)实现多线程断点续传
- Asp.net(c#)实现多线程断点续传[收藏]
- Asp.net(c#)实现多线程断点续传
- Asp.net(c#)实现多线程断点续传