将MaxHttpCollectionKeys增加到250000后,回发期间“操作无效,因为对象的当前状态”错误

时间:2013-10-25 09:55:08

标签: asp.net

我在网页的gridview中使用了视图状态和许多控件。

我还增加了maxhttpcollectionkeys,但仍然是服务器上的错误。

1 个答案:

答案 0 :(得分:0)

你可以在这里找到答案:'Operation is not valid due to the current state of the object' error during postback

将以下内容添加到web.config

中的应用设置中
<appSettings>
<add key="aspnet:MaxHttpCollectionKeys" value="2001" />
</appSettings>