本文介绍了IIS7,SSL和"不显示页面,因为请求实体过大&QUOT。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在64位机器上运行通过SSL上IIS7的ASP.NET应用程序。

We're running an ASP.NET application over SSL on IIS7 on a 64-bit machine.

现在我找到几篇文章提的是,要解决这个错误,我需要修改 system.webServer / serverRuntime中/应将UploadReadAheadSize 。精细。我试图通过 Appcmd.exe的,然后只需手工编辑我的web.config设置此:
      
        

Now I've found several articles mentioning that to resolve this error, I need to modify the system.webServer/serverRuntime/uploadReadAheadSize. Fine. I tried via appcmd.exe and then just manually editing my web.config to set this:

    other config settings

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

然而,当我设置此站点的web.config,我得到这个错误:

However, when I set this in the site's web.config, I get this error:

这部分配置不能在这个路径中使用。当部分在一父级别锁定发生这种情况。锁定是默认设置的(overrideModeDefault =拒绝),或明确包含overrideMode位置标记=拒绝或旧有的allowOverride设置=假。

从那里,我一派,帖子称,这个配置部分需要解锁。于是我就Appcmd.exe的解锁,但我从Appcmd.exe的一个错误:

From there, I Googled and posts said that this config section needs to be unlocked. So I ran appcmd.exe to unlock it, but I get an error from appcmd.exe:

C:\\ WINDOWS \\ SYSTEM32 \\ INETSRV> Appcmd.exe的设置配置-section:system.webserver / serverRuntime中/应将UploadReadAheadSize:1048576 /提交:APPHOST ERROR(消息:未知配置节system.webserver / serverRuntime中/应将UploadReadAheadSize:1048576 更换吗?帮助。)

我得到了它在记事本中的64位打开和修改它:

I got it opened in notepad 64-bit and modified it:

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

首先,它是明智的,让这个被overidden?如果不是,有什么办法?如果重写什么是与这样应将UploadReadAheadSize是大于默认值在我的web.config设置这个潜在的问题是什么?一个网站提到DoS攻击的可能性。

First off, is it wise to allow this to be overidden? If not, what are the alternatives? If it is overridden what are the potential issues with setting this in my web.config so that the uploadreadaheadsize is larger than the default? One site mentioned the potential for a DoS attack.

推荐答案

我会建议,而不是仅仅将其设置为需要这种功能的网站,你可以轻松地用APPCMD,这里是语法使它为表示默认Web站点:

I would recommend instead just setting it up for the Site that requires that kind of functionality, you can easily do that using AppCmd, here is the syntax for enabling it say for Default Web Site:

appcmd.exe set config "Default Web Site" -section:system.webServer/serverRuntime /uploadReadAheadSize:"1048576"  /commit:apphost

服务器运行时允许您设置不同的服务器上(如果它承载第三方网站,或其他非信任的内容等),你可能希望不要允许他们几个其他功能,因此不能委派它(解锁)是有道理的。

Server runtime allows you to set several other features that depending on the server (like if it hosts 3rd party sites, or other non-trusted content) you might want not to allow that for them, so not delegating it (unlocking) makes sense.

这篇关于IIS7,SSL和&QUOT;不显示页面,因为请求实体过大&QUOT。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-28 05:12