Re: Unhandled Exception Handler



If things run okay manually, then to me it points to something in how the
scheduler is handling things. What are you using for a scheduler?


<zacks@xxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:1189782503.633967.126770@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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: Cant schedule a batch file to run in the XP Pro Scheduler
    ... Also look in Explorer and right-click the BAT file itself and check that all ... > a shortcut on the desktop or from the command window directly. ... > does NOT run fine is when I try to call the backup.bat batch file ... Why doesn't the XP task scheduler handle batch files? ...
    (microsoft.public.windowsxp.perform_maintain)
  • Re: Scheduled Tasks result - 0x1
    ... I have created a BAT file which is supposed to automatically connect to ... than to always manually run this BAT file, I am then using windows XP ... scheduler to run this BAT file daily at a given time. ... Administrator account and change the password, ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: MS Scheduled Task
    ... I do get the following test.log after moving the bat file to my C ... echo %date% %time% Start of task> c:\test.log ... A test.log does not get created when I run it via the scheduler. ... Post your version of the batch file here. ...
    (microsoft.public.windowsxp.general)
  • Re: Run .BAT file as scheduled task...
    ... file commands. ... How can I properly run a .BAT file as administrator when logged in as ... Use the Task Scheduler GUI and specify the account ...
    (microsoft.public.windows.server.general)
  • Re: Unhandled Exception Handler
    ... What are you using for a scheduler? ... I have a BAT file that runs the application thussly. ... then have the BAT file scheduled to run as a scheduled task. ... think may help is to add an Unhandled Exception handler to the app so ...
    (microsoft.public.dotnet.languages.vb)