Z
zacks
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?
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?