A
A
Alexander Zaitsev2015-06-06 12:11:09
.NET
Alexander Zaitsev, 2015-06-06 12:11:09

How to find out the reason for the crash of a .NET program on a remote server?

On a remote server, using vbscript, a C# console application is constantly launched at intervals. Sometimes it crashes. Exceptions are handled wherever possible, there is even a global handler

AppDomain.CurrentDomain.UnhandledException += Enviroment.Exit(0);

At what the application does not close, but a window prompting to close the application flies out, because of this it is impossible to start a new instance of the application through vbscript.
Questions:
1) How to make the application just shut down anyway? (In general, by any means, even in the Windows settings)
2) How to find the reason for the departure? (You cannot run VS on the server - there is not enough RAM)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Lastochkin, 2015-06-06
@nithrous

one.

AppDomain.CurrentDomain.UnhandledException 
       += (_, e) => Environment.FailFast("", e.ExceptionObject as Exception);

2. VS/Remote Debugger

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question