zoukankan      html  css  js  c++  java
  • 吭爹的微软

    “/xmodule”应用程序中的服务器错误。
    对象的当前状态使该操作无效。
    说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

    异常详细信息: System.InvalidOperationException: 对象的当前状态使该操作无效。

    源错误:

    执行当前 Web 请求期间生成了未经处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。

    堆栈跟踪:

    [InvalidOperationException: 对象的当前状态使该操作无效。]
       System.Web.HttpValueCollection.ThrowIfMaxHttpCollectionKeysExceeded() +2420258
       System.Web.HttpValueCollection.FillFromEncodedBytes(Byte[] bytes, Encoding encoding) +58
       System.Web.HttpRequest.FillInFormCollection() +159

    [HttpException (0x80004005): URL 编码窗体数据无效。]
       System.Web.HttpRequest.FillInFormCollection() +217
       System.Web.HttpRequest.get_Form() +104
       System.Web.HttpRequest.get_HasForm() +9038047
       System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull) +97
       System.Web.UI.Page.DeterminePostBackMode() +69
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +135

    解决办法

    http://www.cnblogs.com/hexiaosheng/archive/2012/01/10/2317926.html

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

    Author:

    Hi i found the solution, it is due to the recent Microsoft security update we are getting this error. Seems they have added a new method called 'ThrowifmaxhttpkeycollectionKeysexceeded' with default value 1000, which means postback can contain only 1000 items.


    Just add the following to your web.config(2.0 and above)

    <appSettings>
    <add key="aspnet:MaxHttpCollectionKeys" value="5000" />
    </appSettings>
  • 相关阅读:
    CentOS8下升级Python3.6到3.9
    web service基础知识
    mysql+centos7+主从复制
    saltstack高效运维
    Docker
    python如何配置virtualenv
    Python操作 RabbitMQ、Redis、Memcache、SQLAlchemy
    nginx+uWSGI+django+virtualenv+supervisor发布web服务器
    RabbitMQ消息队列-Centos7下安装RabbitMQ3.6.1
    flask-wtforms
  • 原文地址:https://www.cnblogs.com/Guroer/p/2333816.html
Copyright © 2011-2022 走看看