This is more of a Win32 problem than a CLR problem. It sounds like you are working on a service (with no user in front of it), rather than a user app. In that case, you'll need to dig into Win32 exception and error handling.
When a process raises an unhandled SEH exception, NT goes through all sorts of contortions to figure out what to do next. Normally what happens is this: * CSRSS receives an LPC message, indicating that one of its managed processes (which is all normal Win32 processes) has raised an unhandled exception. * CSRSS checks the registry key "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\AeDebug", and looks for several values. If "Debugger" is set, then JIT debugging is enabled, and the "Debugger" value specifies a debugger command line. On clean NT installs, this is Dr. Watson. On machines with debuggers installed (VS .Net, etc.), this usually identifies the JIT debugger. If "Auto" = 0, then CSRSS puts up a dialog box, asking you what you want to do with the process. If "Auto" = 1, then CSRSS runs the command immediately. You can get around this in a variety of ways. Modifying the JIT settings is the easiest. -- arlie -----Original Message----- From: Moderated discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] On Behalf Of Alex Ben-Ari Sent: Wednesday, January 07, 2004 8:11 AM To: [EMAIL PROTECTED] Subject: [ADVANCED-DOTNET] Catching access violations Hello all. The following is most troubling for me and I cannot get rid of it. Thought perhaps someone could help (hope this is not too unadvanced): I have a c# app. During its execution it needs to run a 3rd party executable. It does this through Process.Start and then Process.WaitForExit. The problem is that occasionally this 3rd party exe will crash with an "access violation" message box. This then requires pressing OK before my app Can continue running. This is a major problem, of course, since I need it to run for long periods of time without user intervention being required. How can I catch this violation condition, ignore it and just let the 3rd party exe die and continue with my own flow of execution ? Is there any way to do this ? Thanks to anyone who can help me on this, Alex. =================================== This list is hosted by DevelopMentorR http://www.develop.com Some .NET courses you may be interested in: NEW! Guerrilla ASP.NET, 26 Jan 2004, in Los Angeles http://www.develop.com/courses/gaspdotnetls View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentorŪ http://www.develop.com Some .NET courses you may be interested in: NEW! Guerrilla ASP.NET, 26 Jan 2004, in Los Angeles http://www.develop.com/courses/gaspdotnetls View archives and manage your subscription(s) at http://discuss.develop.com