2015-11-25 105 views
-2

用戶偶爾會遇到錯誤。我將我的應用程序從2003服務器32位2.0框架移至2012服務器(位於雲)64位4.0框架。任何幫助表示讚賞。偶爾NullReferenceException

< Exception Type =" System.NullReferenceException"> 
<Message> Object reference not set to an instance of an object. </ Message > 
<Source> Syncfusion.Grid.Grouping.Web </ Source > 
<StackTrace> at Syncfusion.Web.UI.WebControls.Grid.Grouping.GridGroupingControl.LoadSourceListSet() at Syncfusion.Web.UI.WebControls.Grid.Grouping.GridGroupingControl.LoadViewState(Object savedState) at System.Web.UI.Control.LoadViewStateRecursive(Object savedState) at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) at System.Web.UI.Control.LoadViewStateRecursive(Object savedState) at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) at System.Web.UI.Control.LoadViewStateRecursive(Object savedState) at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) at System.Web.UI.Control.LoadViewStateRecursive(Object savedState) at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) at System.Web.UI.Control.LoadViewStateRecursive(Object savedState) at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) at System.Web.UI.Control.LoadViewStateRecursive(Object savedState) at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) at System.Web.UI.Control.LoadViewStateRecursive(Object savedState) at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) at System.Web.UI.Control.LoadViewStateRecursive(Object savedState) at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) at System.Web.UI.Control.LoadViewStateRecursive(Object savedState) at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) at System.Web.UI.Control.LoadViewStateRecursive(Object savedState) at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) at System.Web.UI.Control.LoadViewStateRecursive(Object savedState) at System.Web.UI.Page.LoadAllState() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) </ StackTrace > 
< Data /> 
</ Exception > 
+3

絕對肯定的是,任何人都無法在沒有看到背後的代碼的情況下提供幫助。 –

回答

0

我們在gridgroupingcontrol中將一些狀態從會話還原到ViewState。無論何時回收IIS,會話都會丟失,並導致更新後的問題。在Web中,會話不會過期,因爲我們會持續刷新會話,但如果您回收無法處理的IIS,則會話必須過期。

要解決此問題,請檢查會話是否已過期。如果是,您的頁面重定向到登錄頁面,重新登錄後,添加一個標誌參數到需要恢復的地址。在頁面加載中,嘗試獲取標誌參數。

我希望它對你有幫助。

如果解決方案無法幫助您,請與我分享有關它的更多信息或分享您的示例代碼。

+0

在mycase中,我使表單超時值和會話狀態超時值與60分鐘相同。 – Sunil