Unhandled Exception Handler



We have an application in use at several dozen of our customers. At
one customer site, it behaves strangely. The same application runs
three times with three different config files passed to it on the
command line. I have a BAT file that runs the application thussly. I
then have the BAT file scheduled to run as a scheduled task. The task
runs fine manually, but when it runs on the schedule, each invocation
of the application in the BAT file dies with an exception that is
getting logged in the Application EventLog. It is a very cryptic
message:

EventType clr20r3, P1 udm.exe, P2 1.0.71.0, P3 46d48a47, P4
system.windows.forms, P5 2.0.0.0, P6 4333aefa, P7 47f1, P8 96, P9
system.invalidoperationexception, P10 NIL.

This means nothing to me. I did some research with Google and didn't
turn up much that was particularly useful to me. One suggestion I
think may help is to add an Unhandled Exception handler to the app so
that I might be able to get a better message in the event log, but I
am wondering just where in the code should I put it?

The application is a Windows Application that has a Sub Main as the
startup object. If there are command line switches, the main form is
not even shown. Whether the main form is shown or not, the actual work
the application does is done by a class library.

So, do I need to add the handler to the Sub Main or in the class
library?

.



Relevant Pages

  • Re: Unhandled Exception Handler
    ... I have a BAT file that runs the application thussly. ... runs fine manually, but when it runs on the schedule, each invocation ... think may help is to add an Unhandled Exception handler to the app so ... The application is a Windows Application that has a Sub Main as the ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Schedule a task
    ... If I schedule single commad all work fine. ... > I have created a user, I have added to the "Backup Operators" group. ... > task (a bat file) run correctly. ...
    (microsoft.public.windows.server.security)
  • Re: Exmerge 2003 as a sheduled task
    ... Call exmerge from a .bat file and use the AT command to schedule the .bat ... > files and the recreation of mailboxes. ...
    (microsoft.public.exchange.setup)
  • Re: Schedule + VBScipt
    ... Oh and to be more specific - The bat file copy's files up to a personal ... I want to use the vbscript to do is schedule a task on the specific machine ... It's basically a backup restore bat file ...
    (microsoft.public.scripting.vbscript)
  • Re: Start database ved AT.exe
    ... When I use the AT.exe to schedule a job and I write: ... In the bat file I have wrote: ... activate the test database) - This doesn't work!!!! ... tech at promail dot com ...
    (comp.databases.ms-access)