如何在Asp.Net上传5GB文件? [英] how to upload a 5GB file in Asp.Net?

查看:77
本文介绍了如何在Asp.Net上传5GB文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好朋友,



有人可以告诉我如何上传一个巨大的文件,假设在asp.net web应用程序中有6GB?在不使应用程序崩溃或处理永久性的情况下,最好的方法是什么?我们不能使用任何第三方控件。什么是最好的方式?我们可以打破块中的文件然后发送然后如何重新排序文件以及如何打破它甚至?请告知。

解决方案

要启用大文件上传,您需要在system.web / httpRuntime配置元素上更改以下属性的值:



maxRequestLength:以KB为单位指定输入流缓冲阈值的限制,并允许您控制允许的上载总大小。任何大于此值的都将导致框架找不到页面错误的默认值。

ExecutionTimeout:指定在被自动关闭之前允许执行请求的最大秒数ASP.NET - 默认时间为110秒。如果请求执行的时间较长,则会抛出异常。

maxAllowedContentLength(IIS 7) - 指定IIS支持的请求中的最大内容长度。默认情况下,它将内容长度限制为30,000,000字节。

请参考此链接: http://blogs.telerik.com/aspnet-ajax/posts/13-07-15/upload-large-files-asp-net-radasyncupload [ ^ ]

尝试

使用ASP.NET和IIS6.0上传大型文件 [ ^ ]

设置Web.config以允许ASP .NET应用程序上载大文件 [ ^ ]


Hello Friends,

Can someone please provide me an idea that how to upload a huge file suppose 6GB in asp.net web application? What will be the best way to do it without making application crash or processing for eternity? We cannot use any third party controls. What will be the best way? Can we break the file in chunks and then send then how will be reorder the file and how would be break it even? Kindly advice.

解决方案

To enable large file uploads you need to change the value of the following attributes on the system.web/httpRuntime configuration element:

maxRequestLength: Specifies the limit for the input stream buffering threshold in KB and allows you to control the allowed total size of the upload. Anything bigger than that will result in the default for the framework "Page not found" error.
ExecutionTimeout: Specifies the maximum number of seconds for which a request is allowed to be executed before being automatically shut down by ASP.NET – the default time is 110 seconds. If the request takes longer to be executed, an exception will be thrown.
maxAllowedContentLength (IIS 7) - specifies the maximum length of content in a request supported by IIS. By default it restricts the content length to 30,000,000 bytes.
Refer this link:http://blogs.telerik.com/aspnet-ajax/posts/13-07-15/upload-large-files-asp-net-radasyncupload[^]


Try
Uploading large files using ASP.NET and IIS6.0[^]
Setting up Web.config to allow uploading of large files by ASP .NET applications[^]


这篇关于如何在Asp.Net上传5GB文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆