Operation is not valid due to the current state of the object.
2014-06-30 10:34
615 查看
昨天客户突然要求将某个角色的所有权限都不分页的放在一个页面修改,本地测试OK,通过;但发布后,点击该页面提交后一直报下面的错误:
异常信息: Operation is not valid due to the current state of the object.
错误源:System.Web
堆栈信息: at System.Web.HttpValueCollection.ThrowIfMaxHttpCollectionKeysExceeded()
at System.Web.HttpValueCollection.FillFromEncodedBytes(Byte[] bytes, Encoding encoding)
at System.Web.HttpRequest.FillInFormCollection()
分析异常信息:System.Web.HttpValueCollection.ThrowIfMaxHttpCollectionKeysExceeded():很有可能是在页面提交时,某个数据过大导致。
在网上找下发现这样的情况,出现这个异常的原因正是因为上年12月29号那次微软发布的最后一次非正常更新程序引起的.在这次安全更新中对于asp.net单次的提交量做了一个最大量限制1000,出现这个异常正是因为页面提交量超过了1000这个限制.这个可以在web.config中增加参数来更改
解决方法:
<appSettings>
<add key="aspnet:MaxHttpCollectionKeys" value="2000" />
</appSettings>
value值根据需要可适当的修改
异常信息: Operation is not valid due to the current state of the object.
错误源:System.Web
堆栈信息: at System.Web.HttpValueCollection.ThrowIfMaxHttpCollectionKeysExceeded()
at System.Web.HttpValueCollection.FillFromEncodedBytes(Byte[] bytes, Encoding encoding)
at System.Web.HttpRequest.FillInFormCollection()
分析异常信息:System.Web.HttpValueCollection.ThrowIfMaxHttpCollectionKeysExceeded():很有可能是在页面提交时,某个数据过大导致。
在网上找下发现这样的情况,出现这个异常的原因正是因为上年12月29号那次微软发布的最后一次非正常更新程序引起的.在这次安全更新中对于asp.net单次的提交量做了一个最大量限制1000,出现这个异常正是因为页面提交量超过了1000这个限制.这个可以在web.config中增加参数来更改
解决方法:
<appSettings>
<add key="aspnet:MaxHttpCollectionKeys" value="2000" />
</appSettings>
value值根据需要可适当的修改
*********************************************************************************************** *【Author】:Mike.Jiang *【Date】:2014年06月30日 *【URL】:http://www.cnblogs.com/dataadapter/archive/2012/06/29/2569795.html *【Notice】: *2、请尊重原创的成果,转载和引用请注明作者及出处。 *3、本文必须全文转载和引用,任何组织和个人未授权不能修改任何内容,并且未授权不可用于商业。 *4、本声明为文章一部分,转载和引用必须包括在原文中。 ***********************************************************************************************
相关文章推荐
- System.InvalidOperationException: Operation is not valid due to the current state of the object.
- Operation is not valid due to the current state of the object.
- ASP.NET4.0错误:Operation is not valid due to the current state of the object
- Operation is not valid due to the current state of the object.
- Operation is not valid due to the current state of the object.
- JavaScriptSerializer 序列化时异常:Operation is not valid due to the current state of the object.
- Error occurred in deployment step ‘Activate Features’: Operation is not valid due to the current state of the object
- SPListItem Update Operation is not valid due to the current state of the object(对象的当前状态使该操作无效。)
- bug:"Operation is not valid due to the current state of the object."
- “Operation is not valid due to the current state of the object.”
- Error occurred in deployment step 'Add Solution': Operation is not valid due to the current state of the object.
- 对象的当前状态使该操作无效 or SPListItem Update Operation is not valid due to the current state of the object
- Operation is not valid due to the current state of the object.
- 'Operation is not valid due to the current state of the object' error during postback
- MOSS: SPListItem.Update() throws error Operation is not valid due to the current state of the object.
- Operation is not valid due to the current state of the object
- Operation is not valid due to the current state of the object解决方法
- GridView Postback后出错Operation is not valid due to the current state of the object.
- 关于 error: Operation is not valid due to the current state of the object。
- 对象的当前状态使该操作无效 or SPListItem Update Operation is not valid due to the current state of the object