asp.net MVC2中的FileUploader

时间:2010-11-12 10:39:25

标签: asp.net asp.net-mvc-2 file-upload

我正在使用fileuploader,我从

获取了代码

http://www.codeproject.com/KB/aspnet/Implementing_HTTP_File_Up.aspx

它的工作正常与小尺寸文件,但它在我尝试上传大文件时显示我的文字。我的文件大小可以是8-10 mb。:

The connection was reset
The connection to the server was reset while the page was loading.
    *   The site could be temporarily unavailable or too busy. Try again in a few
          moments.
    *   If you are unable to load any pages, check your computer's network
          connection.
    *   If your computer or network is protected by a firewall or proxy, make sure
          that Firefox is permitted to access the Web.
请告诉我该怎么做。

2 个答案:

答案 0 :(得分:1)

您可以尝试在web.config中增加最大请求长度:

<configuration>
  <system.web>
    <!-- The value is in KB -->
    <httpRuntime maxRequestLength="4096" />
  </system.web>
</configuration>

答案 1 :(得分:0)

除了Darin Dimitrov给出的答案之外,您可能还需要更改网络应用程序的iis设置。如果您使用的是Sharepoint,则还需要在SCA中对其进行配置。