现在我发现有几篇文章提到要解决这个错误,我需要修改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:\Windows\System32\inetsrv>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攻击的可能性.