How to Remove Session Timeout Dialog

0
0

I am asking this following a previous question that guided me to replace the session timeout with the “Locked Screen” page and that works fine, but i still get the session timeout prompt sometime, not always.

Any help on how to disable or hide this dialog permanently, pls?

  • You must to post comments
1
0

Hi Nicholas,

You’ll have to handle the Application.SessionTimeout event, like so:

Application.SessionTimeout += Application_SessionTimeout;
private static void Application_SessionTimeout(object sender, System.ComponentModel.HandledEventArgs e)
{
e.Handled = true;
}

Note that these lines of code are meant to be placed inside your Program.cs file.

HTH,
Alaa

  • Nicholas
    Hi Alaa, I get the error message “Declaration Expected” for the first line of code “Application.SessionTimeout += Application_SessionTimeout”. Pls note that my codes are in vb.net. Thanks
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.