Uncatchable .NET runtime 2.0 error - user machine - what next?

前端 未结 4 894
后悔当初
后悔当初 2020-12-19 23:06

Situation:

I have an application that uses http connections extensively (stream ripping app) and it is supposed to work 24/7. And it does.

However, occasion

相关标签:
4条回答
  • 2020-12-19 23:24

    If unable to implement an exception handling solution, you can implement some trace logging to narrow down the location in the code and which stream are causing the exception.

    0 讨论(0)
  • 2020-12-19 23:40

    Maybe this article will be helpful A Simple Class to Catch Unhandled Exceptions in WinForms

    UPDATE:

    It very strange.. So grab ProcDump, write batch file and ask your customer to run it when he see error message. Get dump and try to investigate it via WinDbg or VS 2010. Here some more information.

    Also check: Creating and analyzing minidumps in .NET production applications. If you are new to WinDbg, check Tess Ferrandez's blog

    Another way go with Remote Debugging Setup

    0 讨论(0)
  • 2020-12-19 23:41

    Register current domain's unhandled exception in the entry point (Main() or ...):

    AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
    

    Implement logging in the handler:

    static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
            {
                // log
            }
    

    Application will still crash but you will get the full logging of what happened and stack trace.

    UPDATE

    According to the update you have, I suggest you download debugging tools for windows http://www.microsoft.com/whdc/DevTools/Debugging/default.mspx and then enable post-mortem debugging and make sure a crash dump is created (see Enabling Postmortem Debugging section in Windbg help file) and use Windbg to debug your dump to find out where it has crashed.

    0 讨论(0)
  • 2020-12-19 23:43

    You can use Adplus to automatically save minidump whenever an exception occurs. See this question for details: Fastest way to break in WinDbg for specific exception? .net 4.0 app.

    0 讨论(0)
提交回复
热议问题