calling a DOS executable with GUI status window from ASP.NET ??

J

jason

I have a DOS script that runs the batch version of an application
(called SAS) that generates log file. Executed from DOS the script
runs fine generating the log file. Except for a quick GUI flash, the
executable appears to be just a DOS executable.

From ASP.NET, I've am able to run other DOS scripts and DOS
executables without any problems, using code similar to what's below.
However when I attempt run this particular executable the browser
client just hangs in the hourglass endlessly.

Any Ideas?

Also, I've heard of people passing data and parameters to IE and Word
from ASP.NET, any idea


related code:

the dos script:

mybat.bat:
del d:\hedis\asptosas.log
D:\PROGRA~1\SASINS~1\SAS\V8\SAS.EXE -sysin d:\mysite\mysasprog.sas

the asp.net (vb) code:

sub dosas(Src as object, E as EventArgs )
Dim myproc As System.Diagnostics.Process
myproc = New System.Diagnostics.Process()
myproc.StartInfo = New
System.Diagnostics.ProcessStartInfo("d:\mysite\mybat.bat")
myproc.Start()
myproc.WaitForExit()


Thanks for any information or help with this.
 
D

Dmitriy Lapshin [C# / .NET MVP]

Hi Jason,

As far as I know the Process class has a property that prevents the process
being launched from displaying its main window. You can try this to see if
it helps. Then, bear in mind that the user the ASP .NET process runs under
can have no desktop allocated to it, and in this case where SAS would draw
its window on? Finally, log on to the server where your ASP .NET application
runs and see are there any error message boxes or entries in the Event Log.
This might also give you a clue.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top