473,773 Members | 2,269 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

system.diagnost ics.process in asp.net

Hi,

Does anyone know how I could make an .exe launched server
side from an aspx file run faster? When I use javascript
client side it of couse is much faster. Here's my code

This code does work but it's extremely slow. What am I
missing?

Process Updater = new Process();
Updater.StartIn fo.FileName = "C:\\Progra m
Files\\someprog ram.exe";
Updater.StartIn fo.Arguments = "-somearguments";

Updater.StartIn fo.UseShellExec ute = true;
Updater.StartIn fo.CreateNoWind ow = false;
Updater.StartIn fo.WindowStyle =
ProcessWindowSt yle.Maximized;
Updater.Start() ;
Updater.WaitFor Exit();

//Response.Write( "<script>va r oShell = new ActiveXObject
(\"Shell.Applic ation\"); var commandtoRun =
\"c:\\\\Prog ram Files\\\\somepr ogram.exe\"; var
commandParms = \"-somearguments"; oShell.ShellExe cute
(commandtoRun, commandParms,\" \", \"open\", \"1
\");</script>");
//Response.Write( "<script>window .close();</script>");
Nov 15 '05 #1
3 5290
Dave,

I am assuming that you mean the startup for your exe is slow, and not
the exe itself. What you are doing seems correct. What kind of numbers are
you seeing? Also, since this is in an ASP.NET application, what kind of
load are you seeing on the server? This could be an issue.

I am confused though. You ask how you can make an exe launched server
side from an ASPX file run faster. Then you comment on how when you run it
on the client side it is much faster. Most of the time, the client and the
server are two separate machines, so you are going to see radical changes in
the way it is executed. You can't trigger a process to execute on the
client from the server side, you can only write code that when interpreted
in the browser will execute the executable.

I think that what you are trying to do is get a process to run on the
client side. You will have to use javascript injected into your page to do
this. Also, chances are you will not be able to get it to run, given the
security settings of the machine (imagine if any web page could run any
executable on the client machine that they want. Not good).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"dave" <an*******@disc ussions.microso ft.com> wrote in message
news:36******** *************** *****@phx.gbl.. .
Hi,

Does anyone know how I could make an .exe launched server
side from an aspx file run faster? When I use javascript
client side it of couse is much faster. Here's my code

This code does work but it's extremely slow. What am I
missing?

Process Updater = new Process();
Updater.StartIn fo.FileName = "C:\\Progra m
Files\\someprog ram.exe";
Updater.StartIn fo.Arguments = "-somearguments";

Updater.StartIn fo.UseShellExec ute = true;
Updater.StartIn fo.CreateNoWind ow = false;
Updater.StartIn fo.WindowStyle =
ProcessWindowSt yle.Maximized;
Updater.Start() ;
Updater.WaitFor Exit();

//Response.Write( "<script>va r oShell = new ActiveXObject
(\"Shell.Applic ation\"); var commandtoRun =
\"c:\\\\Prog ram Files\\\\somepr ogram.exe\"; var
commandParms = \"-somearguments"; oShell.ShellExe cute
(commandtoRun, commandParms,\" \", \"open\", \"1
\");</script>");
//Response.Write( "<script>window .close();</script>");

Nov 15 '05 #2
Sorry for the confusion,

Actually I am trying to get the .exe run server side. All
my tests so far have been run on the same machine.
It takes almost 10 times longer using the
system.process. diagnostics then client side javascript.
There is very little load on my machine.
Am I completely missing something?

-----Original Message-----
Dave,

I am assuming that you mean the startup for your exe is slow, and notthe exe itself. What you are doing seems correct. What kind of numbers areyou seeing? Also, since this is in an ASP.NET application, what kind ofload are you seeing on the server? This could be an issue.
I am confused though. You ask how you can make an exe launched serverside from an ASPX file run faster. Then you comment on how when you run iton the client side it is much faster. Most of the time, the client and theserver are two separate machines, so you are going to see radical changes inthe way it is executed. You can't trigger a process to execute on theclient from the server side, you can only write code that when interpretedin the browser will execute the executable.

I think that what you are trying to do is get a process to run on theclient side. You will have to use javascript injected into your page to dothis. Also, chances are you will not be able to get it to run, given thesecurity settings of the machine (imagine if any web page could run anyexecutable on the client machine that they want. Not good).
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"dave" <an*******@disc ussions.microso ft.com> wrote in messagenews:36******* *************** ******@phx.gbl. ..
Hi,

Does anyone know how I could make an .exe launched server side from an aspx file run faster? When I use javascript client side it of couse is much faster. Here's my code

This code does work but it's extremely slow. What am I
missing?

Process Updater = new Process();
Updater.StartIn fo.FileName = "C:\\Progra m
Files\\someprog ram.exe";
Updater.StartIn fo.Arguments = "-somearguments";

Updater.StartIn fo.UseShellExec ute = true;
Updater.StartIn fo.CreateNoWind ow = false;
Updater.StartIn fo.WindowStyle =
ProcessWindowSt yle.Maximized;
Updater.Start() ;
Updater.WaitFor Exit();

//Response.Write( "<script>va r oShell = new ActiveXObject (\"Shell.Applic ation\"); var commandtoRun =
\"c:\\\\Prog ram Files\\\\somepr ogram.exe\"; var
commandParms = \"-somearguments"; oShell.ShellExe cute
(commandtoRun, commandParms,\" \", \"open\", \"1
\");</script>");
//Response.Write( "<script>window .close();</script>");

.

Nov 15 '05 #3
It could be load on the server. Also, when JavaScript does it (which
will not work by the way, the only reason it is working now is that you are
running the browser on the server as well), there is nothing that it does in
order to create an object representation of the process. .NET on the other
hand, does, and it can be costly (some other posts have complained about the
startup time of another process).
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

<an*******@disc ussions.microso ft.com> wrote in message
news:60******** *************** *****@phx.gbl.. .
Sorry for the confusion,

Actually I am trying to get the .exe run server side. All
my tests so far have been run on the same machine.
It takes almost 10 times longer using the
system.process. diagnostics then client side javascript.
There is very little load on my machine.
Am I completely missing something?

-----Original Message-----
Dave,

I am assuming that you mean the startup for your exe

is slow, and not
the exe itself. What you are doing seems correct. What

kind of numbers are
you seeing? Also, since this is in an ASP.NET

application, what kind of
load are you seeing on the server? This could be an

issue.

I am confused though. You ask how you can make an

exe launched server
side from an ASPX file run faster. Then you comment on

how when you run it
on the client side it is much faster. Most of the time,

the client and the
server are two separate machines, so you are going to

see radical changes in
the way it is executed. You can't trigger a process to

execute on the
client from the server side, you can only write code

that when interpreted
in the browser will execute the executable.

I think that what you are trying to do is get a

process to run on the
client side. You will have to use javascript injected

into your page to do
this. Also, chances are you will not be able to get it

to run, given the
security settings of the machine (imagine if any web

page could run any
executable on the client machine that they want. Not

good).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"dave" <an*******@disc ussions.microso ft.com> wrote in

message
news:36******* *************** ******@phx.gbl. ..
Hi,

Does anyone know how I could make an .exe launched server side from an aspx file run faster? When I use javascript client side it of couse is much faster. Here's my code

This code does work but it's extremely slow. What am I
missing?

Process Updater = new Process();
Updater.StartIn fo.FileName = "C:\\Progra m
Files\\someprog ram.exe";
Updater.StartIn fo.Arguments = "-somearguments";

Updater.StartIn fo.UseShellExec ute = true;
Updater.StartIn fo.CreateNoWind ow = false;
Updater.StartIn fo.WindowStyle =
ProcessWindowSt yle.Maximized;
Updater.Start() ;
Updater.WaitFor Exit();

//Response.Write( "<script>va r oShell = new ActiveXObject (\"Shell.Applic ation\"); var commandtoRun =
\"c:\\\\Prog ram Files\\\\somepr ogram.exe\"; var
commandParms = \"-somearguments"; oShell.ShellExe cute
(commandtoRun, commandParms,\" \", \"open\", \"1
\");</script>");
//Response.Write( "<script>window .close();</script>");

.

Nov 15 '05 #4

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

Similar topics

0
1745
by: marccruz | last post by:
Given an instance of System.Diagnostics.Process, how can I get the parent process o Given an instance of System.Diagnostics.Process, how can I get the child processes For example, I start a process which executes a script that starts a java program System.Diagnostics.Process proc = System.Diagnostics.Process() proc.StartInfo.FileName = "test.bat"
1
3065
by: Heiko Besemann | last post by:
Dear group, I created an aspx page using System.Diagnostics.Process() to launch "tracert" from shell and redirect output to Response.Output which prints it as text/plain into my browsers window. Now that works fine so far. My problem is that while tracert process is running and ASP ..NET is putting data into the pages output stream, my webapplication is locked until tracert process exits. How can I stop locking my application and be...
1
5989
by: solex | last post by:
Hello All, Hopefully someone has run into this error. I have written a class(source below) that launches a thread to monitor the StandardOutput of a System.Diagnostics.Process, in particular I am executing the find.exe program. The application works perfectly in the development environment. As soon as I execute the compiled program and start the find process I get an "Application Error". The error states that the instruction...
2
15475
by: andreas | last post by:
hi, In windows xp in the start launch menu when i put notepad "c:\test.txt" i get notepad with test.txt in it. in vb.net when i state system.diagnostics.process.start("notepad.exe" i get notepad but
11
3756
by: Nurit N | last post by:
This is the third newsgroup that I'm posting my problem. I'm sorry for the multiple posts but the matter becoming urgent. I hope this is the right place for it... I have created a very simple batch file (echo hello world) and was trying to retrieve the standard output but every time I run the code it returns ExitCode as 1.
0
1804
by: Daniel | last post by:
System.Diagnostics.Process.Start fails on windows server 2003 the process returns process.ExitCode == 0 but executing any process with System.Diagnostics.Process.Start on windows xp works fine. anything to do different for windows server 2003? some special permission for the process that executes another executable with System.Diagnostics.Process.Start ?? here is the code:
0
849
by: Daniel | last post by:
C# windows service freezes on System.Diagnostics.Process.Start(info) When I launch PSCP from a C# windows service and launch pscp 0.53 there are no issues. but when I use C# windows service to launch pscp 0.58 C# freezes in System.Diagnostics.Process.Start(info)? pscp 0.58 works fine at command line, but causes C# to freeze on ystem.Diagnostics.Process.Start(info) also i noticed that the pscp process does not show in taske manager while...
0
4220
by: Colin Williams | last post by:
I am using the code below to map network drive and then fire up an app in a sub dir of that drive. However when using the file open dialog from that app, drive K: appears just as Network drive K: (this could confuse users) rather than showing the path it is mapped to like in explorer. Using a batch file to execute these commands works great. Any ideas? System.Diagnostics.Process.Start("net.exe", "use K:...
0
3020
by: =?Utf-8?B?UHVjY2E=?= | last post by:
-- Hi I'm using vs2005, .net 2 for windows application. The application I started using System.Diagnostics.Process is having a "listFiles.StandardOutput" buffer size problem. I was wondering where and how can I adjust the buffer size problem. I don't want to be limited to a set buffer size, is that possible? thank you. public static int GetNisFile(System.Diagnostics.ProcessStartInfo psi, ref DataTable dtAccounts, ref...
2
6880
by: test3 | last post by:
Hello folks, I'm using System.Diagnostics.Process to start a thirdparty program (that works perfectly when started via command line). I'm using Process.StandardOutput to get the output of the program. That works for 95 %, but the other 5 % it doesn't. It seems to me that the started process just hangs, and therefor my program hangs, too (p.WaitForExit()). I researched that this only happens when the output of the program is longer than...
0
9621
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10039
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8937
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7463
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6717
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5355
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4012
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3610
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.