You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
What does a "Modal state aborted" exception mean? #1093
I've just found some exceptions being logged for my application:
System.ApplicationException: Modal state aborted.
at Wisej.Core.ResponseManager.Http.DoModal()
at Wisej.Web.Form.ShowDialog(Form owner, Action2 onclose) at Wisej.Web.Form.ShowDialog(Action2 onclose)
at MNMS2.Forms.wdMain.btnSettings_Click(Object sender, EventArgs e)
Does it make it the client or do you see in Visual Studio with the Debug->Extensions settings on?
It is thrown when a session is terminated while in a modal loop and it shouldn't show on the client since the session is terminated. For example, a user starts a modal dialog and walks away, or closes the browser, or the code behind the dialog terminates the application before closing the dialog. Wisej detects the that session is invalid and exits the modal state.
The exception interrupts the execution flow, otherwise the app would execute the code waiting for the modal to end on a session that is terminated.
MessageBox.Show("I'm about to format C:\");
// the user goes home and lets the session expire.
// the modal state is interrupted and the line below is not executed.
File.Format("C:\");
I seem to be getting it when closing a modal form hence my interest in what it is. I suspect that it maybe because I'm running in a debugger and my debugging is causing the session to timeout.
Activity
itg-assistant commentedon Jun 12, 2026
Luca answered 2017-09-15 14:01:05 UTC
Does it make it the client or do you see in Visual Studio with the Debug->Extensions settings on?
It is thrown when a session is terminated while in a modal loop and it shouldn't show on the client since the session is terminated. For example, a user starts a modal dialog and walks away, or closes the browser, or the code behind the dialog terminates the application before closing the dialog. Wisej detects the that session is invalid and exits the modal state.
The exception interrupts the execution flow, otherwise the app would execute the code waiting for the modal to end on a session that is terminated.
If you see the exception on the client its a bug.
itg-assistant commentedon Jun 12, 2026
Nic Adams answered 2017-09-15 14:48:43 UTC
I seem to be getting it when closing a modal form hence my interest in what it is. I suspect that it maybe because I'm running in a debugger and my debugging is causing the session to timeout.
Thanks for clarifying
Nic