asp.net - Error with partial postbacks -
i having issue application. web application quite large , works using number of ascx , vb server controls, each of various partial post backs using update panels. works fine on local machine when push application server (iis) notice application throw error during update of update panel. here error:
sys.webforms.pagerequestmanagerservererrorexception: object reference not set instance of object.
i'm not sure causing error or how track down control causing problem. i've tried debugging live application using ie's developer tools. error seems originating web resource, microsoftajaxwebforms.debug.js. function having problem is:
_endpostback: function pagerequestmanager$_endpostback(error, executor, data) { if (this._request === executor.get_webrequest()) { this._processingrequest = false; this._additionalinput = null; this._request = null; } var eventargs = new sys.webforms.endrequesteventargs(error, data ? data.dataitems : {}, executor); sys.observer.raiseevent(this, "endrequest", eventargs); if (error && !eventargs.get_errorhandled()) { throw error; } },
the data variable coming across null. know how address problem or how find out control on page causing issue?
thanks jason
this "lessons learned" me. little background on application , problem seeing. decided wanted create application use update panels as possible, create nice flowing application. in way, wanted create experience user make them think synchronous had had no post backs or page transfers. application our company , running on local intranet.
to this, broke out each component of application , created own server control. example, had group of controls added 1 single user control (ascx) consisted of modal dialog gridviews, buttons, etc on it. keep track of data coming , going, each control kept track of it's own data in session. part, data in sessions lists of objects. application grew (that say, user used application, sessions grow) intermittent errors. these errors occurred when pushed out our server ran fine locally in debug , on local iis server. error took me few days track down ended being object being kept in session sporadically "lost".
as turned out, our iis had cap on in memory size. once cap reached, iis's app pool restarted, causing session reset. did not occur locally because had cap. so, had re-think how data being persisted. ended using view states of data (which requires classes serialized). did have control not use view states , had rely on sessions. one, made sure added method called clear out session data when no longer needed.
in future, think few things differently. first, more judicious use of sessions. i'm not sure if there limitations on view states, have not yet experiences issues. think stay away update panels (the ajax control loolkit together) , rely on regular ajax. second, while update panels make fast development cost heavier partial postbacks.
Comments
Post a Comment