13
我有一個形式的帖子相當大的數據,我得到這個錯誤最大值:MaxHttpCollectionKeys
[InvalidOperationException: Operation is not valid due to the current state of the object.]
System.Web.HttpValueCollection.ThrowIfMaxHttpCollectionKeysExceeded() +2419334
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() +9035903
System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull) +97
System.Web.UI.Page.DeterminePostBackMode() +69
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +135
要解決此我this solution from StackOverflow本身
<appSettings>
<add key="aspnet:MaxHttpCollectionKeys" value="2000" />
</appSettings>
現在我想知道可以爲aspnet:MaxHttpCollectionKeys
設置的最大有效值。將此鍵設置爲最大值時是否有任何問題?
你好,我有一個頁面有一個很長的ListView相同的問題。每行約有400行和約10個控件繼續增長。我已經將MaxHttpCollectionKeys設置爲4000,但它不起作用。你能建議我設定一個值嗎?謝謝 –