Re: C# exe calling an exe (process.start) - not working on one ser

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: William Stacey [MVP] (staceywREMOVE_at_mvps.org)
Date: 11/09/04


Date: Mon, 8 Nov 2004 20:34:07 -0500

Add logging (i.e. Write debug text to a file) to see what is happening when
the thing kicks off. It may not be execing at all - maybe the cmd line is
not found. Check the exit code from the process (if you set exit codes in
the second exe.) Also, I ran into a similar issue where I knew the app
started but just stalled. The problem what Std out redirection related. If
the std out or std err streams get full, it can block the progress of the
app and just freeze. You can test this by setting a timeout on the process
to kill it after X seconds. You should have some timeout anyway to prevent
and/or be notified of such things. The solution to my problem would have
been to create another thread to read the std out so it would not block
(still on my list.) hth

-- 
William Stacey, MVP
http://mvp.support.microsoft.com
"Joseph" <Joseph@discussions.microsoft.com> wrote in message
news:EAC52F61-72B6-4F5F-824C-1B33AD73CA9C@microsoft.com...
> Thank you for your quick response! I am not familier with how to add
> logging... is that on the server or is that something that needs to be
done
> while I build the C# code?
> Thanks again!
>
>
> "bazad" wrote:
>
> > Joseph <Joseph@discussions.microsoft.com> writes:
> >
> > > Hello,
> > >       I have a C# program that builds a txt file and then, calls an
external
> > > exe (this external exe simply imports this txt file into a DBF (DBase)
file.
> > > (we copy a template of the DBF file into the process folder where the
exe
> > > lies and then this clipper EXE does the data move from the txt file to
the
> > > DBF file).
> > >
> > >
> > > This process works fine on at least 3 PCs (Win 2K Pro and Win XP
Pro) -
> > > irrespective of whether I schedule the process or run it by double
clicking
> > > the executable. However, when I try to run this same process on a
Win2000
> > > server, this data move doesn't happen (the DBF file doesn't get
populated).
> > > Since it is a production server, I cannot debug the code there and I
am
> > > unable to recreate the problem on any of the test machines. The
program
> > > doesn't crash or throw an exception - just doesn't do the data move
and
> > > continues as though nothing is wrong. If I call this second exe (for
the data
> > > move) manually, it works fine and moves the data.
> > >
> > > I have this C# program set up on the windows scheduler and it is
running
> > > with privileges of an ID that has Local Adminitrator rights.
> > >
> > > Any suggestions as to how to resolve this?
> > > Thanks
> > >  - Joseph
> >
> > Add logging.
> >
> > I am really guessing.  It might be a security issue.  I know, I know...
> >
> > By the way, Win 2K cmd.exe has some command line size limitations.
> >


Relevant Pages

  • Re: permissions on /etc/namedb
    ... after initially resisting the idea of using rndc trace being 'advanced'. ... Query logging has its own log category, so you would do something like ... Same with debug logging; I'm ... The problem is that the default_debug channel has a special ...
    (freebsd-net)
  • Re: lew? 2 qq
    ... Everyone writes to the same channel, and the logging overhead to stderr is incurred with every call; that can have an adverse impact on performance. ... you have to invent your own formats, disentangle all the output from multiple sources, disentangle important output from less so, and you can't selectively suppress some log output and not other. ... All less critical messages ("WARNING", "DEBUG", etc.) not only are not emitted, they have negligible impact on production performance. ... Logging is configurable at deployment time via an external resource file, so you don't even have to hard-code all that control. ...
    (comp.lang.java.help)
  • [PATCH] firedtv: reinstate debug logging option
    ... Henrik Kurelid tells me that FCP debug logging (which I removed during ... instead of -1 enables only hexdumps of the entire FCP frames. ...
    (Linux-Kernel)
  • RE: Error in Release Mode
    ... The text logging was a good idea. ... some initializations were causing the problems... ... >> In the debug case, m_btestcase may always be false in which case your code ... >> it very useful to create a logging class that writes a textfile. ...
    (microsoft.public.win32.programmer.directx.video)
  • OWA Issues
    ... I don't know what's wrong or how to fix it. ... After logging in as any user, I don't get the GUI interface, only what looks ... Exchange 2003 Std + Patches ...
    (microsoft.public.exchange.admin)