无效的操作异常会阻止整个页面

时间:2014-05-12 09:14:25

标签: c# asp.net wcf web-config

我有一个带有大约1000行的asp转发器的页面,对于某些操作,当我使用post将其运行到异常中并且在整个页面无效之后。

它说“由于对象的当前状态,操作无效”

并显示以下堆栈跟踪

[InvalidOperationException: Operation is not valid due to the current state of the object.]
   System.Web.HttpValueCollection.ThrowIfMaxHttpCollectionKeysExceeded() +2428582
   System.Web.HttpValueCollection.FillFromEncodedBytes(Byte[] bytes, Encoding encoding) +58
   System.Web.HttpRequest.FillInFormCollection() +159

[HttpException (0x80004005): The URL-encoded form data is not valid.]
   System.Web.HttpRequest.FillInFormCollection() +217
   System.Web.HttpRequest.get_Form() +104
   System.Web.HttpRequest.get_HasForm() +9117999
   System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull) +97
   System.Web.UI.Page.DeterminePostBackMode() +69
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +135
</pre></code>

我已将MaxHttpCollectionkeys设置为50,000 我使用WCF,我不明白为什么会这样,有人可以帮助吗?,提前谢谢

0 个答案:

没有答案