[英]How can I upload large (30Mb) files in a ASP.NET application ? (VB) I've tried raising MaxRequestLength, but no luck
How can I upload large (30Mb) files in a ASP.NET application ? 如何在ASP.NET应用程序中上传大文件(30Mb)? (VB) I've tried raising MaxRequestLength, but no luck...
(VB)我已经尝试提高MaxRequestLength,但是没有运气...
I'm using the FileUpload control, I already googled this issue a bit, and people seem to solve it by raising MaxrequestLenght on the web.config file. 我正在使用FileUpload控件,我已经在这个问题上进行了一些搜索,人们似乎可以通过在web.config文件上提高MaxrequestLenght来解决此问题。 I did that, and it didn't work.
我做到了,但没有成功。
I also raised it on the code, and still it doesn't work, the page doesn't even do postback. 我也在代码上提出了它,但仍然不起作用,页面甚至都没有回发。
Any ideas? 有任何想法吗?
Place this in your web.config 将此放置在您的web.config中
<system.web>
<httpRuntime executionTimeout="360" maxRequestLength="100000" />
That enables a 360 second timeout and 100,000 Kb of upload data at a time. 这样一来,即可实现360秒超时和一次100,000 Kb的上传数据。
If that doesn't work, run this command on your IIS server. 如果那不起作用,请在IIS服务器上运行此命令。 (replace [IISWebsitename])
(替换[IISWebsitename])
C:\Windows\System32\inetsrv>appcmd set config "[IISWebsitename]" -section:requestFiltering -requestLimits.maxAllowedContentLength:100000000 -commitpath:apphost
That enables 100,000,000 bytes of upload data at a time. 这样一次可以上传100,000,000字节的数据。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.