We got a .NET WCF service that should be 100% uptime ideally. But sometimes we have a memory leaking issues in our application that caused by 3rd party DB connectivity component. We configured nnCron to watch for process existence and when the process of that service is exited, it should start it again.
But when the app is crashing down windows pops up an noisy window informing that app has crashed.
Here it is:
And only when we click on dumb "Close the program" button, the process really disappearing from system. And only after that nnCron restart service. We don't want to monitor this window appearing, just want to get rid of it for nnCron success work.
So how can we disable such windows?
The OS is Windows server 2008 r2 Standard.
I know this is an old question, but I was having the same problem and found a solution.
Call the following at the start of your application:
SetErrorMode( SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX );
I've tried it with a very simple test application that attempts to dereference a null pointer. Without the line above, my test application would show "... has stopped working dialog." With the line above, the application just dies quietly.
References:
EDIT: Here's an option for disabling that dialog system-wide without modifying code. Create the following registry value as a REG_DWORD and set the value to 1:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\DontShowUI
Reference: WER Settings
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With