zoukankan      html  css  js  c++  java
  • Operation is not valid due to the current state of the object.

    昨天客户突然要求将某个角色的所有权限都不分页的放在一个页面修改,本地测试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值根据需要可适当的修改

  • 相关阅读:
    IM服务器架构实现
    TCP打洞技术
    Java的守护线程与非守护线程
    SQL中时间为空的处理小结
    tfs
    Silverlight技术总结
    PMS
    Silverlight的TabControl的selectionChanged事件中读取不到TextBox值的bug。
    hahahahahah
    APM文章
  • 原文地址:https://www.cnblogs.com/dataadapter/p/2569795.html
Copyright © 2011-2022 走看看