【问题标题】:ASPX file upload error: The Connection to the server was resetASPX 文件上传错误:与服务器的连接已重置
【发布时间】:2013-07-28 07:11:56
【问题描述】:

虽然这个问题asp.net file upload The connection to the server was reset while the page was loading 指的是我正在寻找的解决方案,但它并没有说明要在哪里添加这些新行:

  <security>
    <requestFiltering>
      <requestLimits maxAllowedContentLength="2000000000" />
    </requestFiltering>
  </security>
  <httpRuntime maxRequestLength="2000000000" executionTimeout="999999"/>

请让我知道要在哪里添加这些行:是 machine.config 还是 web.config?在我尝试将其添加到 web.config 的几乎每个部分中,我都遇到了“无法识别的部分错误”。在确定之前,我不想碰 machine.config。谢谢。

【问题讨论】:

  • httpRuntime 是 web.config system.web 部分的一部分,安全性是 system.webserver 的一部分我假设如果使用空 web.config 则必须创建它

标签: asp.net file-upload configuration-files


【解决方案1】:

Web.Config中,需要按如下格式添加:

<configuration>
   <system.web>
      <httpRuntime>

例子:

<configuration>
   <system.web>
      <httpRuntime maxRequestLength="2000000000" executionTimeout="999999"/>
   </system.web>
</configuration>

有关更多信息,您可以阅读文章: http://msdn.microsoft.com/en-us/library/e1f13641(v=vs.71).aspx

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-04-26
    • 2011-04-25
    • 1970-01-01
    • 2012-12-05
    • 1970-01-01
    • 2021-11-26
    • 2019-02-04
    • 1970-01-01
    相关资源
    最近更新 更多