Operation is not valid due to the current state of the object.

今天遇到一个asp.net的草郁闷的问题,看下截图web

狂晕啊,在google上狂搜了一下,好在已经有大侠也遇到过这个问题了,先看下别人的解决办法吧安全

Operation is not valid due to the current state of the object.这种类型的错误有不少,不少都是针对linq的,可是若是是下面的错误类型System.Web.HttpValueCollection.ThrowIfMaxHttpCollectionKeysExceeded() +2692302app

 

不过个人是+2419294,这个好像不是肯定的吧。。。asp.net

 

那就是由于google

由于在此次安全更新中对于asp.net单次的提交量作了一个最大量限制1000,出现这个异常正是由于页面提交量超过了1000这个限制.这个能够在web.config中更改:spa

 

<appSettings>
    <add key="aspnet:MaxHttpCollectionKeys" value="8000" />
  </appSettings>

 

 OK,问题搞定.net

相关文章
相关标签/搜索