设置ASPNET:MaxHttpCollectionKeys编程 [英] Set aspnet:MaxHttpCollectionKeys Programmatically

查看:1375
本文介绍了设置ASPNET:MaxHttpCollectionKeys编程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在一点点管理功能,一个特定的网站,我在做一个特别可怕的职位,就必须一个的的待发布的数据量。 <一href=\"http://stackoverflow.com/questions/8832470/operation-is-not-valid-due-to-the-current-state-of-the-object-error-during-pos\">In为了做到这一点,我不得不添加的Web.config appSetting :

In a bit of admin functionality for a particular site, I'm doing a particularly horrific post that necessitates a large amount of data to be posted. In order to make that happen, I had to add the Web.config appSetting:

<add key="aspnet:MaxHttpCollectionKeys" value="2000" />

不过,我只希望这个大岗一组特定的情况下是不可能的。有什么办法通过编程设置这个值?

However, I only want this large post to be possible under a particular set of circumstances. Is there any way to programmatically set this value?

推荐答案

看起来它是不可能的,每个这样的回答:

Looks like it's not possible, per this answer:

http://stackoverflow.com/a/10753846/570190

因为设置和默认值的读数是一个内部类内部完成你不能覆盖这一点。

"You cannot override this because the reading of the setting and the default value is done inside an internal class."

这篇关于设置ASPNET:MaxHttpCollectionKeys编程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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