Starting new process from aspx page

W

Wally

I know this is an asp.net question but I got 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
 
M

Martin Kulov

Wally said:
I know this is an asp.net question but I got 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.

Hi Wally,
This behavior is expected since the process that you have started belongs to
some other instance of the desktop. Every single user e.g. ASPNET account,
has its own desktop instance and special permissions are needed for
accessing the desktop instance of other accounts.
It seems pretty unnatural that you need to display paint application via web
site call. Can you explain what are you trying to achieve, please?

Regards,

--
Martin Kulov
http://www.codeattest.com/blogs/martin

MCAD Charter Member
MCSD.NET Early Achiever
MCSD
 
W

Wally

Martin

Thanks for your interest, I understand what you say, I didn't realise the
relationship between the ASPNET account and desktops ..

I am actually trying to zip a hierarchy of files on the server, using Winzip
command line utility, I was using mspaint just to test the process.start
call. When I saw nothing appear I thought there was a problem.

Maybe it will work, so long as I need no user interaction.

Any response appreciated.
 
M

Martin Kulov

Wally said:
Martin

Thanks for your interest, I understand what you say, I didn't realise the
relationship between the ASPNET account and desktops ..

I am actually trying to zip a hierarchy of files on the server, using
Winzip
command line utility, I was using mspaint just to test the process.start
call. When I saw nothing appear I thought there was a problem.

Hi Wally,
every single user has a designated desktop to run its applications at. The
basic idea is that the process is actually running but you can not see its
UI because it is started on other desktop.
Just find a way to test your work without UI elements and you will be fine.
For example create a trace file and log all relevant actions there.

Best regards,

--
Martin Kulov
http://www.codeattest.com/blogs/martin

MCAD Charter Member
MCSD.NET Early Achiever
MCSD
 
W

Wally

Martin

Thanks for the info.

regards

wally

Martin Kulov said:
Hi Wally,
every single user has a designated desktop to run its applications at. The
basic idea is that the process is actually running but you can not see its
UI because it is started on other desktop.
Just find a way to test your work without UI elements and you will be fine.
For example create a trace file and log all relevant actions there.

Best regards,

--
Martin Kulov
http://www.codeattest.com/blogs/martin

MCAD Charter Member
MCSD.NET Early Achiever
MCSD
 
J

Jorge Alves

Hi!
I want to know if it is possible to open a UI of a process calling a
webservice.
I read the answer. If I logon (I've changed the local policy, and webservice
and client are all local) as the ASPNET user, I think I have the same
desktop. I even joined the ASPNET user to the administrators (I reset the
password too). But I can't still open an cmd window, although I see the
process.
Is it possible? How?
 
T

Tiago Halm

Jorge,

Its not about being possible, its not even logic or expected. Why would you
need a page to do open a UI on the server side? No one will be able to
interact with that UI anyway ...

Tiago Halm
 

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

Forum statistics

Threads
473,778
Messages
2,569,605
Members
45,237
Latest member
AvivMNS

Latest Threads

Top