【问题标题】:how can i upload file more than 4 g size in c# ASP.net如何在 c# ASP.net 中上传超过 4 g 大小的文件
【发布时间】:2015-06-14 11:09:48
【问题描述】:

我创建了上传项目,但我无法上传大文件。我阅读了更多文章,并尝试更多地将这个值放入 M​​ax Length,但我无法让它发挥作用。

<httpRuntime maxRequestLength="2000000000" delayNotificationTimeout="108000" executionTimeout="108000000000" />

<sessionState timeout="360000" sqlCommandTimeout="360000" stateNetworkTimeout="360000"></sessionState>

如果我放 3 G 我做不到

<httpRuntime maxRequestLength="3000000000" delayNotificationTimeout="108000" executionTimeout="108000000000" />

我在这一行有错误。我需要上传超过 4 或 6 G 的文件 注意:我使用 MVC 和 Visual Studio 2013 感谢您的帮助。

【问题讨论】:

  • 即使可以,也不应该。您应该“逐块”上传文件。你可以阅读这篇文章codeproject.com/Articles/43272/…。它适用于 Web 服务,但想法是一样的。

标签: c# asp.net asp.net-mvc upload


【解决方案1】:

设置maxRequestLength="4294967295"

【讨论】:

    【解决方案2】:

    修改 web.config 中的 maxAllowedContentLength 设置

           <system.webServer>
              <security>
                <requestFiltering>
                  <requestLimits maxAllowedContentLength="(mention size)" />
                </requestFiltering>
              </security>
           </system.webServer>
    

    【讨论】:

      猜你喜欢
      • 2011-11-01
      • 2016-07-07
      • 2014-08-22
      • 2011-07-06
      • 1970-01-01
      • 2012-09-11
      • 2017-10-23
      • 2015-11-23
      • 1970-01-01
      相关资源
      最近更新 更多