关于 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.
at System.Web.HttpValueCollection.ThrowIfMaxHttpCollectionKeysExceeded()
at System.Web.HttpValueCollection.FillFromEncodedBytes(Byte[] bytes, Encoding encoding)
at System.Web.HttpRequest.FillInFormCollection()
后来发现,客服端post过来的参数,传过来一大堆不用的,但感觉也不应该会抛异常啊。
后来把参数纠正后(减少了很多post过来的参数),就正确了。
但不甘心,又网上搜索了下,查到如下解决方法:
<configuration>
<appSettings>
<add key="aspnet:MaxHttpCollectionKeys" value="5000" />
</appSettings>
</configuration>
开来FillInFormCollection,是有个数限制的。以后得多多注意。
关于 error: 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.
Sharepoint 部署的时候出现一个错误 Error occurred in deployment step 'Add Solution': Operation is not valid due ...
- “Operation is not valid due to the current state of the object.”
将Repeater单页显示的2000条数据一次性提交的时候出现这个错误: 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.net的草郁闷的问题,看下截图 狂晕啊,在google上狂搜了一下,好在已经有大侠也遇到过这个问题了,先看下别人的解决办法吧 Operation is not valid due ...
- GridView Postback后出错Operation is not valid due to the current state of the object.
一.问题起因 最近项目中有一页面第一次search后正常,但是再次点击其它任何按钮都会报错,亦即postback后页面有问题,经检查是由于页面有一GridView且数据量极大,记录大概有上千条,这儿解 ...
- Failed to decrypt protected XML node "DTS:Password" with error 0x8009000B "Key not valid for use in specified state.". You may not be authorized to access this information. This error occurs when t
Question SSIS包从A服务器搬迁到B服务器,运行报错 Description: Failed to decrypt protected XML node "DTS:Password ...
- kali kvm Requested operation is not valid: network 'default' is not active
安装时候参考的:http://www.ilanni.com/?p=6101 今天安装完kvm,满是幸福的装了个xp,重启后出现了一个错误 Requested operation is not vali ...
- Error: cannot find a valid baseurl for repo: rpmfusion-free 解决办法
今天在玩CentOS的时候出现了: Error: cannot find a valid baseurl for repo: rpmfusion-free 这个问题真到好恶心啊,以前一直使用到是ubu ...
- centos安装软件Error: Cannot find a valid baseurl for repo: base
今天使用yum安装软件,出现下面的提示: Loaded plugins: fastestmirror, refresh-packagekit, securityLoading mirror speed ...
- Yum出错Error: Cannot find a valid baseurl for repo: base(转)
centos yum 错误 Error: Cannot find a valid baseurl for repo: base 装了个CentOS 6.x,使用yum时出现了下面的错误提示.Loade ...
随机推荐
- jsp页面中引用其他页面的方法
初看这个标题....大家的感觉一定是好2啊.....博主一定要说jsp的动态引用(jsp:include)和静态引用(@include)了.介绍这两者区别的文章已经烂大街了..一搜一大把..博主竟然还 ...
- 万恶的jar包冲突
搭了个spring+struts2+mybatis的项目架子, 好久不用myEclipse和tomcat了,生疏了好多. 建议还是去百度一些框架整合的博客,直接使用博客里面给的jar包列表里的jar包 ...
- Authcode()
加密解密函数Authcode(): 1. // 参数解释 2. // $string: 明文 或 密文 3. // $operation:DECODE表示解密,其它表示加密 4. // ...
- XHR——XMLHttpRquest对象
创建XMLHttpRequest对象 与之前众多DOM操作一样,创建XHR对象也具有兼容性问题:IE6及之前的版本使用ActiveXObject,IE7之后及其它浏览器使用XMLHttpRequest ...
- 转:浅谈UNIX下Apache的MPM及httpd.conf配置文件中相关参数配置
为什么要并发处理 以Apache为代表的web服务器中,如果不支持并发,则在一个客户端连接的时候,如果该客户端的任务没有处理完,其他连接的客户端将会一直处于等待状态,这事不可想象的,好像没有为什么要不 ...
- 单词words
论一类脑筋急转弯题和奇技淫巧题的解题技巧 [题意] 给定n个长为m且只包含xyz的字符串,定义两个字符串的相似程度为它们对应位置相同字符个数(比如xyz和yyz的相似程度为2,后两位相同),分别求出相 ...
- CF100965C题解..
求方程 \[ \begin{array}\\ \sum_{i=1}^n x_i & \equiv & a_1 \pmod{p} \\ \sum_{i=1}^n x_i^2 & ...
- 【GoLang】golang 中 defer 参数的蹊跷
参考资料: http://studygolang.com/articles/7994--Defer函数调用参数的求值 golang的闭包和普通函数调用区别:http://studygolang.com ...
- js颠倒数组元素顺序reverse()
颠倒数组元素顺序reverse() reverse() 方法用于颠倒数组中元素的顺序. 语法: arrayObject.reverse() 注意:该方法会改变原来的数组,而不会创建新的数组. 定义数组 ...
- (分享) git详解
今天学了下git http://blog.jobbole.com/78960/ 他写的超级好的 之前也弄过,在eclipse上有个关于github的一个插件,可以通过github的仓库地址把ec ...