On all of the ASP.NET Web Forms project I publish I always have the same error. When the page is left idle for 30 minutes, if I try to do something like push a button, (if customErrors is off) the page throws an error to the console:
MicrosoftAjaxWebForms.js:6 Uncaught TypeError: Cannot read properties of undefined (reading 'PRM_ServerError')
at Sys.WebForms.PageRequestManager._createPageRequestManagerServerError (MicrosoftAjaxWebForms.js:6:11462)
at Sys.WebForms.PageRequestManager._parseDelta (MicrosoftAjaxWebForms.js:6:29608)
at Sys.WebForms.PageRequestManager._onFormSubmitCompleted (MicrosoftAjaxWebForms.js:6:25637)
at Array.<anonymous> (MicrosoftAjax.js:6:307)
at MicrosoftAjax.js:6:51370
at Sys.Net.WebRequestpleted (MicrosoftAjax.js:6:89678)
at XMLHttpRequest._onReadyStateChange (MicrosoftAjax.js:6:84277)
If CusomeErrors is on, it just redirects to the page error.
Also this doesn't happen while running from Visual Studio.
I have tried this <sessionState timeout="180" />
And setting Cookie settings: Mode=AutoDetect, Name=ASP.NET_SessionId, TimeOut=180 minutes, Regenerate expired session id=checked in IIS Manager -> Site -> Session State
I'm not providing any code because this happens with every ASP.NET Web Forms project that I work on. It's simply independent of my code.
On all of the ASP.NET Web Forms project I publish I always have the same error. When the page is left idle for 30 minutes, if I try to do something like push a button, (if customErrors is off) the page throws an error to the console:
MicrosoftAjaxWebForms.js:6 Uncaught TypeError: Cannot read properties of undefined (reading 'PRM_ServerError')
at Sys.WebForms.PageRequestManager._createPageRequestManagerServerError (MicrosoftAjaxWebForms.js:6:11462)
at Sys.WebForms.PageRequestManager._parseDelta (MicrosoftAjaxWebForms.js:6:29608)
at Sys.WebForms.PageRequestManager._onFormSubmitCompleted (MicrosoftAjaxWebForms.js:6:25637)
at Array.<anonymous> (MicrosoftAjax.js:6:307)
at MicrosoftAjax.js:6:51370
at Sys.Net.WebRequest.completed (MicrosoftAjax.js:6:89678)
at XMLHttpRequest._onReadyStateChange (MicrosoftAjax.js:6:84277)
If CusomeErrors is on, it just redirects to the page error.
Also this doesn't happen while running from Visual Studio.
I have tried this <sessionState timeout="180" />
And setting Cookie settings: Mode=AutoDetect, Name=ASP.NET_SessionId, TimeOut=180 minutes, Regenerate expired session id=checked in IIS Manager -> Site -> Session State
I'm not providing any code because this happens with every ASP.NET Web Forms project that I work on. It's simply independent of my code.
The issue you're encountering seems related to the session timing out due to idle inactivity, which causes the session to expire. This results in the "Cannot read properties of undefined" error in your JavaScript when the user attempts to interact with the page after the session has expired. Since this works fine during development in Visual Studio but not when deployed, the problem likely stems from how the session timeout and cookies are managed in IIS or the ASP.NET application configuration.
Or Implement session expiration handling in JavaScript and/or server-side logic to gracefully handle expired sessions.
Or If necessary, investigate load balancing issues or use a centralized session store.