加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > asp.Net > 正文

asp.net – IIS7,SSL和“由于请求实体太大,因此未显示该页面.”

发布时间:2020-12-16 04:09:27 所属栏目:asp.Net 来源:网络整理
导读:我们在64位计算机上的IIS7上通过SSL运行ASP.NET应用程序. 现在我发现有几篇文章提到要解决这个错误,我需要修改system.webServer / serverRuntime / uploadReadAheadSize.精细.我尝试通过appcmd.exe,然后只需手动编辑我的web.config来设置: other config set
我们在64位计算机上的IIS7上通过SSL运行ASP.NET应用程序.

现在我发现有几篇文章提到要解决这个错误,我需要修改system.webServer / serverRuntime / uploadReadAheadSize.精细.我尝试通过appcmd.exe,然后只需手动编辑我的web.config来设置:

other config settings

    -->
    <serverRuntime uploadReadAheadSize="1048576" />
  </system.webServer>

但是,当我在网站的web.config中设置它时,我收到此错误:

This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault=”Deny”),or set explicitly by a location tag with overrideMode=”Deny” or the legacy allowOverride=”false”.

从那里,我用谷歌搜索和帖子说,这个配置部分需要解锁.所以我运行appcmd.exe来解锁它,但是我从appcmd.exe收到错误:

C:WindowsSystem32inetsrv>appcmd.exe set config -section:system.webserver/serverruntime/uploadreadaheadsize:1048576 /commit:apphost ERROR (message:Unknown config section “system.webserver/serverruntime/uploadreadaheadsize:1048576”. Replace with ? for help. )

我把它打开64位记事本并修改它:

<section name="serverRuntime" overrideModeDefault="Allow" />

首先,让它被覆盖是明智的吗?如果没有,有哪些替代方案?如果它被覆盖,在我的web.config中设置它的潜在问题是什么,以便uploadreadaheadsize大于默认值?一个站点提到了DoS攻击的可能性.

解决方法

我建议只是为需要这种功能的网站设置它,你可以使用AppCmd轻松地做到这一点,这里是启用默认网站的语法:
appcmd.exe set config "Default Web Site" -section:system.webServer/serverRuntime /uploadReadAheadSize:"1048576"  /commit:apphost

服务器运行时允许您设置多个其他功能,这些功能取决于服务器(如果它承载第三方站点或其他不受信任的内容)您可能不希望为它们提供这些功能,因此不委托它(解锁)是有意义的.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读