What does a "Modal state aborted" exception mean?

Answered
0
0

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, Action`2 onclose)
at Wisej.Web.Form.ShowDialog(Action`2 onclose)
at MNMS2.Forms.wdMain.btnSettings_Click(Object sender, EventArgs e)

What does this mean?

Thanks

Nic

  • You must to post comments
Best Answer
0
0

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:\");

If you see the exception on the client its a bug.

 

  • You must to post comments
0
0

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

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.