On my development machine (where the group 'Everyone' has full access
to every directory), the following code successfully shells to a
console application:
Dim objShell As System.Diagnost ics.Process = New
System.Diagnost ics.Process()
With objShell
.StartInfo.File Name = "C:\Project\MyA pp\MyApp.exe"
.StartInfo.Argu ments = " 123"
.StartInfo.Work ingDirectory = "C:\Project\MyA pp\"
.StartInfo.Crea teNoWindow = True
.StartInfo.UseS hellExecute = False
.Start()
End With
When I transfer my ASP.Net project to the production server, the
console application starts (ie 'MyApp.exe' appears in Windows Task
Manager), but then hangs.
Using System.Security .Principal.Wind owsIdentity.Get Current().Name( ) I
have checked that the ASP.Net application is running under the context
of MACHINE\ASPNET and I have given this user full access to the
directory "C:\Project\MyA pp\" and execute permissions to
"C:\Project\MyA pp\MyApp.exe".
I don't think the console app is throwing an error as the program with
arguments runs fine from the command prompt and the development
server. I have experimented with a simple console application that
simply writes to a log file in the working directory, however this
fails to executes, suggesting that the program has insufficient
read/write access to the working directory.
I suspect that the System.Diagnost ics.Process requires read/write
access to a directory or process other then those given in the
FileName and WorkingDirector y properties. Can anyone help?
Both the Development and Production servers are running Win2K
5.00.2195 & .Net 1.1
Thanks,
Stephen