Asp.net并上传大文件 [英] Asp.net and uploading large files

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

问题描述

我正在Godaddy上使用Asp.net 3.5,并且我需要用户使用Asp.net FileUpload Control上传大文件的方法,我不想使用第三方

我更改了web.config中的maxRequestLength的值,如下所示:

I''m using Asp.net 3.5 on Godaddy, and I need a way for users to upload large files using Asp.net FileUpload Control, I don''t want to use a third party

I''ve changed the value of maxRequestLength in web.config as follows:

<httpRuntime executionTimeout="1100" maxRequestLength="512000" />



但是当上载约32 MB的文件时,上传过程进行得很好(我可以在Chrome浏览器的左下角看到该过程的百分比),但是过一会儿,该过程会重新启动!并且上传一段时间后页面崩溃而没有错误(只是告诉我该页面无法显示)

在IE上也会发生同样的情况(但当然没有百分比)

请帮助我解决此问题,而无需第三方



but when uploding a file of about 32 MB, upload process goes well (I can see percentage for the process in the down-left corner of Chrome browser), but after a while, the process restarts !! and after going with upload for a while page crashes without errors (just telling me that page cannot be displayed)

The same happens on IE (but of course without percentage)

Please help me to solve this issue without third party

推荐答案

此设置位于您的web.config文件中.它会影响整个应用程序,但是...我不认为您可以为每页设置它.
This setting goes in your web.config file. It affects the entire application, though... I don''t think you can set it per page.
<configuration>
  <system.web>
    <httpRuntime maxRequestLength="xxx" />
  </system.web>
</configuration>



"xxx"以KB为单位,默认值为4096(= 4 MB).

我尝试了10240(10 MB),它对我有用.

这篇文章对您有用吗?

谢谢
Murugan



"xxx" is in KB, the default is 4096 (= 4 MB).

I tried it for 10240(10 MB) and it works for me.

Was this post useful to you?

Thanks
Murugan


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

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