.NET 3.5 下载大文件

发布于 2024-08-01 19:05:40 字数 185 浏览 2 评论 0原文

我想让用户下载一个大文件 - 大约 4GB。 我希望他们能够恢复失败的下载。

任何人都可以就执行此操作的最佳方法提出任何建议吗? 或者是否有任何现成的组件已经取得了成功?

我正在使用 IIS7 来托管该应用程序。

我见过一些方法,但它们都很旧了。

干杯, 大卫。

I want to allow users to download a large file - around 4GB. I'd like them to have the ability to resume failed downloads.

Can anyone make any recommendations on the best way to do this? Or are there any off the shelf components out there that ppl have had success with?

I'm using IIS7 to host the app.

I've seen a few approaches out there, but they're all quite old.

Cheers,
David.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

盛装女皇 2024-08-08 19:05:40

您可以让您的用户使用下载管理器,例如 MS 文件传输管理器< /a> 或 免费下载管理器 或者您可以自己推出。

You could have your uses utilize a download manager like the MS File Transfer Manager or Free Download Manager or you could roll your own.

肩上的翅膀 2024-08-08 19:05:40

看看我的帖子 支持暂停/恢复的 ASP.NET Web API 文件下载服务

它展示了如何在支持暂停/恢复的 Web API 中实现文件下载服务。 您可以选择其中提供的两种方法之一 - FileStream 包装器或内存映射文件(此方法仅适用于您的应用程序可以作为 64 位运行)。 两者都应该支持任意大的文件。

使用 Web API 可以为您带来额外的好处,即能够在 Windows 服务或“正常”.net 应用程序中托管服务。

Take a look at my post ASP.NET Web API file download service with resume support

It shows how to implement file download service in Web API that supports pause/resume. You can pick one of two approaches presented there - either a FileStream wrapper or memory-mapped files (this one will work only your app can run as 64bit). Both should support arbitrarily large files.

Using Web API gives you additional benefit of being able to host the service in windows service or 'normal' .net applicaiton.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文