Process.Start

  • Thread starter Thread starter BrassicaNigra
  • Start date Start date
B

BrassicaNigra

Greetings,

I am using Process.Start from a web app to run an executable that produces a
text file that is subsequently imported into SQL Server. This has been
working reliably for over a year.

Last weekend we setup Active Directory on our network and now this process
no longer works. The process is started, but the text file never appears in
the output directory and the process just hangs (I have to terminate it from
task manager on the server console).

Since it was working before we implemented Active Directory I am presuming
that this must have something to do with rights. Task manager says it is
running as 'System' and system has full rights to the folder where the output
file should go, so I am at a loss as to what might be happening or how to fix
this.

I look forward to your input.

Dale Hoffman
 
Could it be displaying a message box that you cannot see because it's
running under the system account?
 
Yes, I suppose so.

I frequently work in our server room and today the console of the server
would put up an error message that said the program failed to initialize -
click OK to terminate.

I have tried running it under other accounts using the overload of
Process.Start that allows you to specify a username and password.

Also, I can run the exact same command from the command prompt and it works
just fine.
 
Hello Dale

To verify whether that exe is displaying a message box that the interactive
user cannot see, you can use process explorer to look at the call-stack of
each thread in the process. Process Explorer can be downloaded from
http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx. Run procexp
as admin, configure the windows symbol path, find the process in the
process tree, double-click it, and turn to the Threads tab. You will see
all threads in the list. Double click each thread and you can see their
call stacks. If there are functions like MessageBox in the stack trace, it
means that the app is waiting for the user input in the message box.

Process Monitor is a very power tool to check whether it's some security
issue (e.g. Access Denied when accessing the file system or other
resources) that causes the problem.
http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx. Process
Monitor can trace all behaviors of applications in file system, registry,
image loading, thread creation, network, etc. The video
http://www.microsoft.com/emea/spotlight/sessionh.aspx?videoid=346
demonstrates the use of process monitor in detail. After you get the log,
you can either analyze it by yourself by focusing on the entries with
"Access Denied" or "XXX not found" results, or send the log file to me.

Regards,
Jialiang Ge ([email protected], remove 'online.')
Microsoft Online Community Support

=================================================
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

This posting is provided "AS IS" with no warranties, and confers no rights.
=================================================
 
Back
Top