• 吭爹的微软


    “/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>
  • 相关阅读:
    linux的usr目录的全称是什么
    python多线程与多进程及其区别
    redis禁用危险命令
    测试文档
    mysql5.7.23windows安装
    Nginx如何处理手机端和PC端跳转不同页面
    nginx if多条件判断
    centos7单用户模式修改密码
    Django其四
    Django简单搭建编辑页面
  • 原文地址:https://www.cnblogs.com/Guroer/p/2333816.html
Copyright © 2020-2023  润新知