Question: I have two .Net applications running on client machine.One is IMSOperations and other is IMSInvoice.Both are windows forms application using C#.

What happens is when both of these applications are running,after some time IMSOperations gets automatically closed.

What i tried is to find reason of closing by subscribing to main form's Form\_Closing() event.IS there any other way to figure out what's going on and why is that application getting closed.

Answer: 
Might I suggest adding these to make sure no exception is being thrown:

You need to add this line to your Main():

```
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);

```

and add appropriate handlers to display any exceptions.

(ThreadException handles exceptions UI thread exceptions. UnhandledException handles non-UI thread exceptions.)
Is it a clean exit? or its throwing an exception? 

If its the first there must be some code that checks the status of the other application. If its the latter you have to find the source of the crash.