【问题标题】:File Upload Control cannot handle large files (greater than 75MB) in ASP.NET C# [duplicate]文件上传控件无法处理 ASP.NET C# 中的大文件(大于 75MB)[重复]
【发布时间】:2013-11-14 11:19:22
【问题描述】:

我在我的应用程序中使用 FileUpload 控件来上传文本文件。 此控件适用于较小的文件,但当我尝试上传 80MB 文件时,浏览器会显示一个空白页面并显示“Internet Explorer 无法显示该网页”。

【问题讨论】:

  • @SriramSakthivel :谢谢你,Sriram,我之前没有检查过那个帖子。

标签: c# asp.net file-upload large-files


【解决方案1】:

一开始我无法理解这种奇怪的行为,因为在提交页面之后甚至在调用特定页面之前就显示了空页面。 例如:我必须调用 buttonClick 事件,但是当我单击该按钮时,空白页面即将到来。

解决方案是添加 httpRunTime 执行超时和 maxRequestLength 属性。

将以下内容添加到 web.config 文件的部分。

<system.web>
       -- some code -- 
  <httpRuntime executionTimeout="600" maxRequestLength="102400" />
       --some code --
</system.web>

希望对你有帮助。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-01-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-11-23
    • 1970-01-01
    相关资源
    最近更新 更多