为什么上传大于 100KB 的文件时会超时?

发布于 2024-09-26 16:06:48 字数 344 浏览 0 评论 0原文

我在 IIS7 上有一个网站。我最多可以上传 100KB,但如果我尝试任何大于 100K 的文件,则会出现超时错误。

我已将以下设置添加到我的 web.config 文件中,但出现了相同的错误:

<security>
  <requestFiltering>
    <requestLimits maxAllowedContentLength="2000000000"></requestLimits>
  </requestFiltering>
</security>

可能出了什么问题?

I have a web site on IIS7. I can upload a maximum of 100KB, but if I try any files larger than 100K then I get a timeout error.

I have added following setting to my web.config file but I am getting the same error:

<security>
  <requestFiltering>
    <requestLimits maxAllowedContentLength="2000000000"></requestLimits>
  </requestFiltering>
</security>

What could be wrong?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

你穿错了嫁妆 2024-10-03 16:06:48

您可能还需要检查 web.config 中的 元素,以确保它不会限制您的请求大小。

You might also want to check your <httpRuntime> element in the web.config to ensure that it isn't limiting your request size there.

傻比既视感 2024-10-03 16:06:48

尝试增加 HttpServerUtility.ScriptTimeout 属性。您可以在脚本中执行此操作:

Server.ScriptTimeout = 300; // Set timeout to 300 seconds

或者您可以在 web.config 中进行配置:

<configuration>
  <system.web>
    <httpRuntime 
       executionTimeout = "300"
    />
  </system.web>
</configuration>

有关详细信息,请参阅:

httpRuntime 元素(ASP.NET 设置架构)

Try increasing the HttpServerUtility.ScriptTimeout property. You can do this in your script:

Server.ScriptTimeout = 300; // Set timeout to 300 seconds

Or you can configure in your web.config in:

<configuration>
  <system.web>
    <httpRuntime 
       executionTimeout = "300"
    />
  </system.web>
</configuration>

For more info see:

httpRuntime Element (ASP.NET Settings Schema)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文