源錯(cuò)誤:
執(zhí)行當(dāng)前 Web 請(qǐng)求期間生成了未處理的異常。可以使用下面的異常堆棧跟蹤信息確定有關(guān)異常原因和發(fā)生位置的信息。 |
堆棧跟蹤:
[InvalidOperationException: 對(duì)象的當(dāng)前狀態(tài)使該操作無(wú)效。] System.Web.HttpValueCollection.ThrowIfMaxHttpCollectionKeysExceeded() +2692482 System.Web.HttpValueCollection.FillFromEncodedBytes(Byte[] bytes, Encoding encoding) +61 System.Web.HttPRequest.FillInFormCollection() +148[HttpException (0x80004005): URL 編碼窗體數(shù)據(jù)無(wú)效。] System.Web.HttpRequest.FillInFormCollection() +206 System.Web.HttpRequest.get_Form() +68 System.Web.HttpRequest.get_HasForm() +8743911 System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull) +97 System.Web.UI.Page.DeterminePostBackMode() +63 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +133 |
[InvalidOperationException]: 對(duì)象的當(dāng)前狀態(tài)使該操作無(wú)效。 在 System.Web.HttpValueCollection.ThrowIfMaxHttpCollectionKeysExceeded() 在 System.Web.HttpValueCollection.FillFromEncodedBytes(Byte[] bytes, Encoding encoding) 在 System.Web.HttpRequest.FillInFormCollection()[HttpException]: URL 編碼窗體數(shù)據(jù)無(wú)效。 在 System.Web.HttpRequest.FillInFormCollection() 在 System.Web.HttpRequest.get_Form() 在 System.Web.HttpRequest.get_HasForm() 在 System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull) 在 System.Web.UI.Page.DeterminePostBackMode() 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) [HttpUnhandledException]: 引發(fā)類型為“System.Web.HttpUnhandledException”的異常。 在 System.Web.UI.Page.HandleError(Exception e) 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 在 System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 在 System.Web.UI.Page.ProcessRequest() 在 System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) 在 System.Web.UI.Page.ProcessRequest(HttpContext context) 在 asp.content_3csalesweb_employeesaleslistseach_aspx.ProcessRequest(HttpContext context) 位置 c:/Users/aa/AppData/Local/Temp/Temporary asp.net Files/web/48229cbb/2dbb4478/App_Web_mfh1pmfe.6.cs:行號(hào) 0 在 System.Web.Httpapplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() 在 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously |
上述問(wèn)題的解決方案如下:
ThrowIfMaxHttpCollectionKeysExceeded()問(wèn)題在這里.出現(xiàn)這個(gè)異常的原因正是因?yàn)樯夏?2月29號(hào)那次微軟發(fā)布的最后一次非正常更新程序引起的.在這次安全更新中對(duì)于asp.net單次的提交量做了一個(gè)最大量限制1000,出現(xiàn)這個(gè)異常正是因?yàn)轫?yè)面提交量超過(guò)了1000這個(gè)限制
解決辦法有兩種:
第一種:用分頁(yè)控制頁(yè)面數(shù)據(jù)呈現(xiàn)數(shù)據(jù)量,盡量把數(shù)據(jù)放在緩存中,用分頁(yè)控制數(shù)據(jù)呈現(xiàn)量,每頁(yè)100條數(shù)據(jù)。
第二種:這個(gè)可以在web.config中更改<appSettings><add key="aspnet:MaxHttpCollectionKeys" value="5000" /></appSettings>
新聞熱點(diǎn)
疑難解答
圖片精選
網(wǎng)友關(guān)注