How to show the UI of EXE in ASP.NET

L

Leo

I am trying to invoke an EXE in ASP.NET.

string path = "notepad.exe";
ProcessStartInfo startInfo = new ProcessStartInfo(path);
startInfo.WindowStyle = ProcessWindowStyle.Normal;

Process.Start(startInfo);

I could see that the process for notepad in Task Manager. But the
notepad is not directly show up. I don't want notepad to run behind
the scene: I would like to "see" it. Any idea?

Thanks in advance.

Leo
 
J

John Timney \(Microsoft MVP\)

The web server has no concept of an interface. It is there to satisfy
request for remote users. Your asking it to run notepad on the web server,
ina desktop that doesn't exits.

If you want to see the file, you'll have to send it to yourself as output
from your asp.net request.

--
Regards

John Timney
Microsoft Regional Director
Microsoft MVP
 
L

Lucas Tam

(e-mail address removed) (Leo) wrote in @posting.google.com:
I could see that the process for notepad in Task Manager. But the
notepad is not directly show up. I don't want notepad to run behind
the scene: I would like to "see" it. Any idea?

You want to see it on the client machine?

Sorry... you can't do that. You'll need to recreate the UI and pass the
parameters to notepad.

Or, you can run a terminal services application.

Or, you can create a Windows Form version of the program and embed it into
a webpage.
 
B

bruce barker

iis runs as a service, and as such has no access to the desktop (screen). as
any process (exe) you start will not be able to open a window (secuirty
violation), you should only run console apps from an aspx page.

-- bruce (sqlwork.com)
 
D

Dale

If you really need to do that, check out the web RDP client and do it with
terminal services. You can use the default web RDP page from Microsoft as a
template and make your own.

Just something to think about.

Dale
 
L

Lau Lei Cheong

A server-side code that enables client-side EXE to run? Quite impressive.
I wonder why there could be notepad.exe really showing on task manager
Are you running notepad to edit other things at that time? Or do you view
the page installed at local IIS server?

But if you really could do that, I'll advice you to take a look at
"Rundll32.exe"
and "ShowWindow()" API with parameter 5(maximize).You can maximize
the window with some trick.
 

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,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top