【问题标题】:"Link appears to be broken" when uploading large file上传大文件时“链接似乎已损坏”
【发布时间】:2011-10-23 21:33:36
【问题描述】:

通过我的 ASP.NET Web 应用程序上传 42MB 文件时,会出现以下问题,具体取决于所使用的浏览器:

谷歌浏览器:

Oops! This link appears to be broken

火狐:

XML Parsing Error: no element found

Internet Explorer

The webpage cannot be found

我不认为这是文件大小限制的问题,因为我的 web.config 中有以下内容:

<httpRuntime maxRequestLength="409600" executionTimeout="9000" />

这在我们的开发服务器 (IIS6) 上运行良好,但在实时服务器 (IIS7) 上却不行

为什么会这样?如何防止这种情况发生?

【问题讨论】:

  • 您的 web.config 中请求最大大小和请求超时的值是多少?
  • maxRequestLength 为 409600,executionTimeout 为 9000
  • 上传请求是否到达您的 aspx page_load ?您可以通过在页面加载时放置 BP 来检查
  • @Ankur 无法测试调试,因为问题仅在实时服务器上,我们无法调试/BP:/
  • 嗯.. IIS 日志或来自 ASP.NET 的 Windows 事件日志中的任何内容?

标签: asp.net iis-7 file-upload


【解决方案1】:

IIS7 似乎没有读取:

<httpRuntime maxRequestLength="409600" />

IIS7 的替代方案似乎是:

<system.webServer>
  <security>
    <requestFiltering>
      <requestLimits maxAllowedContentLength="209715200"></requestLimits>
    </requestFiltering>
  </security>
</system.webServer>

【讨论】:

    猜你喜欢
    • 2022-01-26
    • 2021-10-20
    • 2013-05-23
    • 2020-03-18
    • 2016-01-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-12-10
    相关资源
    最近更新 更多