Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Closing an application
Message
From
30/08/2011 03:37:56
 
 
To
29/08/2011 14:21:34
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01522144
Message ID:
01522199
Views:
33
>>I would create a Close Event and have the main app listen for that .... don't know if the calling hierarchy is causing a problem or not..
>
>I am not sure I understand the first part. When it is time to close the app, I call the Close() method. There is only one app. It relies on a flag from the database to know if it has to close or not. This is a robot. It loops every minute and checks for that in the first place. If it has to be close, then Close() is called.
>
>This is in reference to thread #1514219.
>
>The only enhancement I could think of at this point would be to move up the Close() at the higher level, diminishing the risk that calling it several methods down below could have an impact.

Several things are not clear:

(a) In the earlier thread you refer to this as a 'robot'. Does this mean you have a WinForms application which is engaged in running background tasks ? Any third party components involved ?

(b) You say 'When it is time to close the app. I call the Close() method". AFAIR in Winforms there are 'Application.Exit()' and Form.Close(). Which are you using ?

(c) Can you post more detail on the exception ? FWIW it looks as if the error might be with the jit compiler which would imply that the code causing the exception had not previously been executed. You may get better information if you turn on JIT debugging:
http://msdn.microsoft.com/en-us/library/5hs4b7a6(v=vs.80).aspx
Note that, for WinForms you also need to set this directly in either the machine or application config.....
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform