如何使用 IIS 7.5 更改可以在表单中发布的字段数量? [英] How to change the amount of fields that can be posted in a form with IIS 7.5?

查看:16
本文介绍了如何使用 IIS 7.5 更改可以在表单中发布的字段数量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在网络应用的管理部分遇到了一些表单问题.有一些表单包含大量字段(范围可以从一个输入字段到数百个).

We've hit a problem with some forms in the admin portion of our web app. There are a handful of forms that contain a large number of fields (it can range anywhere from one input field to the hundreds).

我们发现,随着这些表单的增长,当表单发布时,服务器有时会抛出 500 个错误.

We've found that as these forms grow, there is a point where the server will throw 500 errors when a form is posted.

运行测试后,我发现服务器可以处理包含 100 个字段的表单;一旦使用了 101 个或更多字段,我们就会得到错误.

After running a test, I was able to find that the server can handle forms with 100 fields in them; once 101 or more fields are used, we get the errors.

我们运行 Coldfusion,我们确定 Coldfusion 没有抛出此错误.我们从未在 Coldfusion 中看到此错误记录,因此我们假设 IIS 甚至在将请求发送到 Coldfusion 服务器之前就抛出了错误.

We run Coldfusion, and we have determined that Coldfusion is not throwing this error. We never see this error logged in Coldfusion, so we are assuming IIS is throwing an error even before it sends the request to the Coldfusion server.

我假设在 IIS 7.5 中有一些设置可以提高这个限制.我在网上搜索过,但我能找到的只是如何提高此数据的字节大小限制,而不是对允许的字段数量的任何限制.

I'm assuming there is some setting in IIS 7.5 where we can up this limit. I've searched on the web, but all I can find is how to raise the byte-size limits of this data, not any kind of limit on a number of fields that are allowed.

那么,我是否正确地假设这可以改变,如果可以,怎么做?

So, am I right in assuming that this can be changed, and if so, how can it be done?

推荐答案

这是修补程序 APSB12-06 引入的问题.虽然这是一个 ColdFusion 错误,但人们报告说 在 Tomcat 中收到错误,然后才可能到达 CF 服务器

This is an issue introduced with hotfix APSB12-06. While it is a ColdFusion error, people have reported receiving the error in Tomcat, before it supposedly hit the CF server

neo-runtime.xml 中有一个设置,它定义了 postsizelimit - 默认为 100.

There is a setting in neo-runtime.xml which defines the postsizelimit - and is defaulted to 100.

完整的注释位于 这里,但这里是简短的版本.

The full notes are located here, but here is the short version.

此热修复在 ColdFusion 中有一个新设置,即后参数限制.此设置限制发布请求中的参数数量.默认值为 100.如果 post 请求包含更多指定的参数,则服务器不处理该请求并引发异常.此过程使用 Hash Collision 防止 DoS 攻击.此设置不同于帖子大小限制(ColdFusion 管理员 > 设置 > 帖子数据的最大大小).此设置未在 ColdFusion 管理员控制台中公开.但是您可以在 neo-runtime.xml 文件中轻松更改此限制.见下文第 5 点.想要更改 postParameterLimit 的客户,请转到 {ColdFusion-Home}/lib 进行服务器安装或 {ColdFusion-Home}/WEB-INF/cfusion/lib 进行多服务器或 J2EE 安装.在行之后打开文件 neo-runtime.xml.

<var name='postSizeLimit'><number>100.0</number></var>

添加下面的行,您可以将 100 更改为所需的数字.

<var name='postParametersLimit'><number>100.0</number></var>

CF10+ 在Server Settings -> 下的最大POST 请求参数数 下的CF Admin Settings 页面中具有可编辑的设置.设置.

CF10+ has the setting available to edit within the CF Admin Settings page under Maximum number of POST request parameters under Server Settings -> Settings.

在我们的 9.0.1 服务器上,我们只是将设置增加到 10000,并且没有看到任何不利影响.

On our 9.0.1 server, we just increased the setting up to 10000 and have seen no adverse effects.

这篇关于如何使用 IIS 7.5 更改可以在表单中发布的字段数量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆