EventType Clr20r3, P1 ggreadcard.exe, P2 1.0.0.0, P3 51d3d283, P4 Zljy.common, P5 1.0.0.0, P6 4fc6c236, P7, P8, P9 s Ystem.nullreferenceexception, P10 NIL. How to solve it! The solution to the problem is to find out the root of the problem first.
In the development of the WinForm program, using multi-threading, after the server deployment, always automatic shutdown program, the symptoms are described as follows:
in Windows Server 2003 operating system , run. Net 2.0 or 3.5 The system Event Viewer will find similar EventType clr20r3 P1 .... P2 ... Pn
The most likely reason is that the application has an exception, and . NET does not or cannot catch the exception, so the following occurs:
1. The program shuts down automatically.
2. at this point, you will see a DW20.exe process in the Task Manager and will soon disappear automatically .
3. The Event Viewer will find similar EventType clr20r3 P1 .... P2 ... false hint for PN.
 
solution one:. in Config file <configuration> <runtime> <legacyunhandledexceptionpolicy Enabled = "true"/> </runtime></configuration> security , you should find out where to throw the exception and modify it.
Workaround Two:
using the unhandledexceptioneventhandler event, we can intercept the uncaught exception and handle it.
Event arguments for this eventUnhandledExceptionEventArgs E,There are two properties, one isExceptionobject This property tells us whether this exception will cause the application to terminate. What needs to be explained here is, for and . Net2.0 and above, the situation is not the same, . Net1.1 . Net2.0
in main form main
AppDomain.CurrentDomain.UnhandledException +=new < Span style= "color: #2b91af; padding:0px; margin:0px; " >unhandledexceptioneventhandler (Unhandledexceptioneventhandler);
and encode the Unhandledexceptioneventhandler event,
static void Unhandledexceptioneventhandler (object sender, UnhandledExceptionEventArgs e)
{
Try
{
Loghelper.errorlog (e.exceptionobject.tostring ());//loghelper is the class that writes the log, here, can write directly to the file
}
Catch
{
}
}
Run the program, catch the exception, find out where the problem is, and rewrite the code.
www.wonima.com I Nima the world's best-looking jokes picture website
Window Form program crashes unexpectedly, EventType CLR20R3 error Resolution