Sarting New Process from aspx page

W

Wally

I know this is an asp.net question but I've had no answers there.

How do you start a new visible process from a asp.net page?

I can use:

System.Diagnostics.Process.Start ("mspaint.exe");

from Main() in console application and it works fine.

When I put it in the Page_Load procedure of an aspx page, the process is
started, as viewed from TaskManager, but nothing is visible. I've tried all
sorts of StartInfo strings, still the same.
I've tried all sorts of applications, including a .bat file with only a
PAUSE statement, still wont open a command window.
What I really want to do is open the winzip command line utility to zip some
files up, but that seems irrelevant until I can gain control of this action.

Any ideas would be appreciated
 
H

Henning Krause [MVP]

Hello,

starting a new process from within an ASP.NET application will start that
application on the server, not on the client. Since it is started from a
service, it is displayes on a special desktop - not the users desktop.

Anyway, if you want to zip files, you should use a class library for that.
For example SharpZipLib
(http://www.icsharpcode.net/OpenSource/SharpZipLib/).

Greetings,
Henning Krause
 
W

Wally

Henning
Thanks for the response, Ill check the class out.

Back to my question:

I know the process will start on the server, but why is it not visible when
viewed at the server. Actually, I have a complete local installation of
IIS,SQL so it should appear on my PC. Why does the bat file not open a window
and pause there?

Any comments appreciated
 
H

Henning Krause [MVP]

Hello,

if that process would be opened on the users desktop, this would introduce a
security problem, since the process could be accessed with the SendMessage()
and PostMessage() API. Therefore, processes are launched on a special
desktop so no interaction with the desktop is possible.

And since you call the program from a service, which is supposed to run
without an interactively logged-on user, there is no need to display the
window.

Greetings,
Henning Krause
 
W

Wally

Henning

Many thanks for the info, I've got the zip class library you mentioned.


regards

wally
 

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

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,145
Latest member
web3PRAgeency
Top