代码之家  ›  专栏  ›  技术社区  ›  Dr. Rajesh Rolen

asp.net MVC2中的文件上载程序

  •  0
  • Dr. Rajesh Rolen  · 技术社区  · 15 年前

    我正在使用文件上传程序,我从

    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 回复  |  直到 15 年前
        1
  •  1
  •   Darin Dimitrov    15 年前

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

    <configuration>
      <system.web>
        <!-- The value is in KB -->
        <httpRuntime maxRequestLength="4096" />
      </system.web>
    </configuration>
    
        2
  •  0
  •   bgmCoder    14 年前

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