[英]What is max file upload size in IIS6.0? and how do we overcome that?
In my application, I would like to upload files of size more than 3GB. 在我的应用程序中,我想上传大于3GB的文件。 I increased max file request timeout as high as possible.
我增加了最大文件请求超时。
But it is not even posting the page to the server when I select a 3GB file. 但是,当我选择一个3GB的文件时,它甚至没有将页面发布到服务器上。
My web site configuration: 我的网站配置:
Is it possible with the above configuration? 上面的配置可以吗? If not what is the reason, and how do I resolve this?
如果不是,原因是什么,我该如何解决?
You'll need to adjust both the timeout and request length in your web.config appropriately: 您需要在web.config中适当地调整超时和请求长度:
<system.web>
<httpRuntime maxRequestLength="102400" executionTimeout="360"/>
</system.web>
Of course keep in mind, a 3Gb file is going to require a lot of patience. 当然,请记住,一个3Gb的文件将需要很大的耐心。 In reality, I suggest investigating alternatives - HTTP post is not going to be pretty with files of this size.
实际上,我建议研究替代方法-这种大小的文件的HTTP发布不会很漂亮。
I'd probably go with a FTP approach. 我可能会采用FTP方法。 Using FTPWebRequest - try Google for sample code.
使用FTPWebRequest-尝试使用Google以获得示例代码。
Unfortunately adjusting the timeout and request length is not going to work. 不幸的是,调整超时和请求长度是行不通的。 Your web server will run out of memory before the upload completes.
上传完成之前,您的Web服务器将耗尽内存。
What you need is a file upload control that will break your upload into smaller chunks, so that you don't use all of the server's memory to hold the file while it is uploading. 您需要一个文件上载控件,该控件将把您的上载分成较小的块,这样您就不必在文件上载时使用服务器的所有内存来保存文件。
One of the better file upload controls available is Darren Johnstone's ASP.NET File Upload control. 可用的更好的文件上传控件之一是Darren Johnstone的ASP.NET File Upload控件。 This free control is a drop-in replacement for the standard ASP.NET file upload component, and is specifically designed to handle large files.
此免费控件是标准ASP.NET文件上传组件的直接替代,并且专门用于处理大文件。 It even includes a progress bar that doesn't require Flash.
它甚至包括一个不需要Flash的进度条。
Complete documentation and installation instructions are here : 完整的文档和安装说明在这里 :
http://darrenjohnstone.net/aspnet-file-uploaddownload-module-v2-documentation/ http://darrenjohnstone.net/aspnet-file-uploaddownload-module-v2-documentation/
The control (and source code) can be downloaded here : 控件(和源代码)可以在这里下载 :
http://darrenjohnstone.net/downloads/ http://darrenjohnstone.net/downloads/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.