之前,客戶向我們投訴在其站點(diǎn)老遇到這個(gè)問題:
為薩迦等地區(qū)用戶提供了全套網(wǎng)頁設(shè)計(jì)制作服務(wù),及薩迦網(wǎng)站建設(shè)行業(yè)解決方案。主營(yíng)業(yè)務(wù)為成都網(wǎng)站設(shè)計(jì)、成都網(wǎng)站建設(shè)、外貿(mào)網(wǎng)站建設(shè)、薩迦網(wǎng)站設(shè)計(jì),以傳統(tǒng)方式定制建設(shè)網(wǎng)站,并提供域名空間備案等一條龍服務(wù),秉承以專業(yè)、用心的態(tài)度為用戶提供真誠(chéng)的服務(wù)。我們深信只要達(dá)到每一位用戶的要求,就會(huì)得到認(rèn)可,從而選擇與我們長(zhǎng)期合作。這樣,我們也可以走得更遠(yuǎn)!
這是我第一次遇到這個(gè)奇怪的錯(cuò)誤提示信息,幸好客戶提供了錯(cuò)誤日志。
2012-08-02 10:47:15,860 [22] ERROR Logger - Operation is not valid due to the current state of the object.
SOURCE: System.Web
TARGETSITE: Void ThrowIfMaxHttpCollectionKeysExceeded()
STACKTRACE: at System.Web.HttpValueCollection.ThrowIfMaxHttpCollectionKeysExceeded()
at System.Web.HttpValueCollection.Add(HttpCookieCollection c)
at System.Web.HttpRequest.FillInParamsCollection()
at System.Web.HttpRequest.GetParams()
at System.Web.HttpRequest.get_Params()
at Accela.ACA.Web.Component.AppSpecInfoTableEdit.GetValueFromHttp(Boolean isAdding, Int32 controlloop, String suffix, String prefix, Int32 groupIndex)
at Accela.ACA.Web.Component.AppSpecInfoTableEdit.GetControlValue(Int32 groupIndex, String prefix, Int32 itemIndex, Int32 rowIndex, String suffix, Boolean isGetRealRowIndex)
at Accela.ACA.Web.Component.AppSpecInfoTableEdit.ShowAppSpecInfoGroup(AppSpecificTableModel4WS appInfoTable, Int32 groupIndex, PlaceHolder phCurrentAppInfoTable, String prefix)
at Accela.ACA.Web.Component.AppSpecInfoTableEdit.Repeater_ItemDataBound(Object sender, DataListItemEventArgs e)
at System.Web.UI.WebControls.DataList.OnItemDataBound(DataListItemEventArgs e)
at System.Web.UI.WebControls.DataList.CreateItem(Int32 itemIndex, ListItemType itemType, Boolean dataBind, Object dataItem)
at System.Web.UI.WebControls.DataList.CreateControlHierarchy(Boolean useDataSource)
at System.Web.UI.WebControls.BaseDataList.OnDataBinding(EventArgs e)
at System.Web.UI.WebControls.BaseDataList.DataBind()
at Accela.ACA.Web.Component.AppSpecInfoTableEdit.Display()
at Accela.ACA.Web.Cap.CapEdit.InitAppSpecTable(String value, CapModel4WS capModel)
at Accela.ACA.Web.Cap.CapEdit.LoadPage(PageModel customPage, CapModel4WS capModel)
at Accela.ACA.Web.Cap.CapEdit.BindPageflowGroup(CapModel4WS capModel4WS, PageFlowGroupModel pageflowGroup)
at Accela.ACA.Web.Cap.CapEdit.OnInit(EventArgs e)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Page.Proce***equestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
從這段日志去分析,好像是ASP.NET Runtime有意拋出來,也就是說我們應(yīng)該是違反了.NET Framework的某些規(guī)則才導(dǎo)致成這樣。后來我就在網(wǎng)上搜索,找到了根本原因:這是由于NET Framework V4.0在2011年12月29號(hào)發(fā)布的一個(gè)更新引起的,具體的詳細(xì)情況和解決思路,請(qǐng)參考下面這篇文章:
ASP.NET MS11-100: how can I change the limit on the maximum number of posted form values?
http://stackoverflow.com/questions/8684049/asp-net-ms11-100-how-can-i-change-the-limit-on-the-maximum-number-of-posted-for
解決思路:
<appSettings>
…
<add key="aspnet:MaxHttpCollectionKeys" value="5000" />
</appSettings>
當(dāng)前名稱:ASP.NET4.0錯(cuò)誤:Operationisnotvalidduetothecurrentstateoftheobject
URL地址:http://aaarwkj.com/article8/gghjip.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站排名、Google、響應(yīng)式網(wǎng)站、手機(jī)網(wǎng)站建設(shè)、網(wǎng)站營(yíng)銷、網(wǎng)站內(nèi)鏈
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)