473,403 Members | 2,284 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Problem with System.Diagnostics.Process in ASP .NET

Hi,

I'm not able to run external applications from ASP .NET
(C#) with the Process class. The program appears in the
Windows Task Manager but doesn't run.
Nov 18 '05 #1
7 1514
if it is in the task manager that implies it is running. how are you firing
the external app?
here is a complete example, pay attention to the hidden attribute

ProcessStartInfo psi = new ProcessStartInfo("notepad.exe");
psi.WindowStyle = ProcessWindowStyle.Hidden;

Process p = new Process();
p.EnableRaisingEvents = true;
p.Exited += new EventHandler(MyExited);
p.StartInfo = psi;
p.Start();

..... do stuff ...

p.Kill(); // Try killing the process

--
Regards,
Alvin Bruney
Got tidbits? Get it here...
http://tinyurl.com/3he3b
"Ron Fidel" <fi***@unisfair.com> wrote in message
news:09****************************@phx.gbl...
Hi,

I'm not able to run external applications from ASP .NET
(C#) with the Process class. The program appears in the
Windows Task Manager but doesn't run.

Nov 18 '05 #2
My guess is that your external application is running under a different user
(and thus in the non-interactive desktop).

Try setting your ASP.NET process to the user account of a user and logging
in to the server as that user.

kelly

"Ron Fidel" <fi***@unisfair.com> wrote in message
news:09****************************@phx.gbl...
Hi,

I'm not able to run external applications from ASP .NET
(C#) with the Process class. The program appears in the
Windows Task Manager but doesn't run.

Nov 18 '05 #3
My guess is that your external application is running under a different user
(and thus in the non-interactive desktop).

Try setting your ASP.NET process to the user account of a user and logging
in to the server as that user.

kelly

"Ron Fidel" <fi***@unisfair.com> wrote in message
news:09****************************@phx.gbl...
Hi,

I'm not able to run external applications from ASP .NET
(C#) with the Process class. The program appears in the
Windows Task Manager but doesn't run.

Nov 18 '05 #4
I'm trying to run a command script (.cmd) with arguments,
the same way I run it from the command line. The ASP .NET
code is running without errors but nothing is happaning.
My code is:
process1.StartInfo.FileName = DirPath + "\\makelist.cmd";
process1.StartInfo.Arguments = StreamName;
process1.Start();

I also tried with adding
process1.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
process1.StartInfo.UseShellExecute = true;
but it doesn't help.

BTW
I'm trying to convert a VB6 code that did the job with
Shell (DirPath & "\makeList.cmd " & StreamName)

Thanks,
Ron Fidel
Unisfair
-----Original Message-----
if it is in the task manager that implies it is running. how are you firingthe external app?
here is a complete example, pay attention to the hidden attribute
ProcessStartInfo psi = new ProcessStartInfo ("notepad.exe");psi.WindowStyle = ProcessWindowStyle.Hidden;

Process p = new Process();
p.EnableRaisingEvents = true;
p.Exited += new EventHandler(MyExited);
p.StartInfo = psi;
p.Start();

..... do stuff ...

p.Kill(); // Try killing the process

--
Regards,
Alvin Bruney
Got tidbits? Get it here...
http://tinyurl.com/3he3b
"Ron Fidel" <fi***@unisfair.com> wrote in message
news:09****************************@phx.gbl...
Hi,

I'm not able to run external applications from ASP .NET
(C#) with the Process class. The program appears in the
Windows Task Manager but doesn't run.

.

Nov 18 '05 #5
I'm trying to run a command script (.cmd) with arguments, the same way I
run it from the command line. The ASP .NET code is running without
errors but nothing is happaning.
My code is:
process1.StartInfo.FileName = DirPath + "\\makelist.cmd";
process1.StartInfo.Arguments = StreamName;
process1.Start();

I also tried with adding
process1.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
process1.StartInfo.UseShellExecute = true;
but it doesn't help.

BTW
I'm trying to convert a VB6 code that did the job with
Shell (DirPath & "\makeList.cmd " & StreamName)

Thanks,
Ron Fidel
Unisfair

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #6
I'm trying to run a command script (.cmd) with arguments,
the same way I run it from the command line. The ASP .NET
code is running without errors but nothing is happaning.
My code is:
process1.StartInfo.FileName = DirPath + "\\makelist.cmd";
process1.StartInfo.Arguments = StreamName;
process1.Start();

I also tried with adding
process1.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
process1.StartInfo.UseShellExecute = true;
but it doesn't help.

BTW
I'm trying to convert a VB6 code that did the job with
Shell (DirPath & "\makeList.cmd " & StreamName)

Thanks,
Ron Fidel
Unisfair
-----Original Message-----
if it is in the task manager that implies it is running. how are you firingthe external app?
here is a complete example, pay attention to the hidden attribute
ProcessStartInfo psi = new ProcessStartInfo ("notepad.exe");psi.WindowStyle = ProcessWindowStyle.Hidden;

Process p = new Process();
p.EnableRaisingEvents = true;
p.Exited += new EventHandler(MyExited);
p.StartInfo = psi;
p.Start();

..... do stuff ...

p.Kill(); // Try killing the process

--
Regards,
Alvin Bruney
Got tidbits? Get it here...
http://tinyurl.com/3he3b
"Ron Fidel" <fi***@unisfair.com> wrote in message
news:09****************************@phx.gbl...
Hi,

I'm not able to run external applications from ASP .NET
(C#) with the Process class. The program appears in the
Windows Task Manager but doesn't run.

.

Nov 18 '05 #7
I'm trying to run a command script (.cmd) with arguments, the same way I
run it from the command line. The ASP .NET code is running without
errors but nothing is happaning.
My code is:
process1.StartInfo.FileName = DirPath + "\\makelist.cmd";
process1.StartInfo.Arguments = StreamName;
process1.Start();

I also tried with adding
process1.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
process1.StartInfo.UseShellExecute = true;
but it doesn't help.

BTW
I'm trying to convert a VB6 code that did the job with
Shell (DirPath & "\makeList.cmd " & StreamName)

Thanks,
Ron Fidel
Unisfair

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Charlie Kunkel | last post by:
I need help. I have a directory I'm watching for creation of .TIF files, whereupon creation, I need to launch a process (command line exe) that converts the TIF file to a postscript file. (using...
7
by: Microsoft News | last post by:
Hi all. Does id() xpath function work in System.XML? I have built dtd, schema, xdr for a simple xml which includes attributes definded as ID and IDREFS. Validation is occurring properly for all...
1
by: Primo | last post by:
Hello, I am building a data management application with the following processes: Process 1 is a Windows service which uses FileSystemWatcher to monitor a directory. Process 2 opens a file...
2
by: Tobias Johansson | last post by:
Hello, I'm having what I believe a security problem to execute an executable file from a windows service in windows server 2003. It works fine in WIN XP SP2 The program(the service) itself...
0
by: Scott Zabolotzky | last post by:
I'm using the following code to launch SIGNCODE.EXE to sign a CAB provisioning file from an ASP.NET app. When I run the code the exit code comes back as -1. I have not been able to determine what...
4
by: Eran AMiel | last post by:
Hi I am trying to get the processes list from using the code attached. In win xp it works great but in win 2000 i get only one process the idle Any Ideas ? The Code : Dim Vec As...
2
by: XxLicherxX | last post by:
Hello, I tried posting this in a different VB.net newsgroup, but never got a response. Please let me know if there is a better group to post this in. Thanks. For some reason I cannot look at...
0
by: mikepl746 | last post by:
I'm trying to run the svn command in a System.Diagnostics.Process to parse the StandardOutput. If I run the command in a CMD window while Regional settings are set to Japanese I see something like...
2
by: Bala Nagarajan | last post by:
Hello, I am having issues when i use the Systsem.Diagnostics.Process namespace to start a process. The problem is that i am able to succeed in starting a process (an exe) only few times in a row...
5
by: Benzi Eilon | last post by:
I have written a C# application which should run as a Windows Service. I must avoid having multiple instances of the application on one machine so I inserted the following code at the beginning of...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.