Launch an interactive window from ASP.NET

E

Eric

Hello,

I need to allow a web page to launch an interactive program on the web
server. For this example, I'd like to have the ASP.NET open notepad on the
asp server, so the current logged-in user can see it.

Here's the code I have implemented. Notepad starts, but is not visible on
the server desktop.

****************************
Dim commandPrompt As New System.Diagnostics.Process
Dim ps As New System.Diagnostics.ProcessStartInfo("notepad.exe")

ps.UseShellExecute = False
ps.RedirectStandardInput = False
ps.RedirectStandardOutput = False
ps.RedirectStandardError = False
ps.WorkingDirectory = "c:\"
ps.CreateNoWindow = false
ps.WindowStyle = 3

Dim proc As System.Diagnostics.Process = commandPrompt.Start(ps)

****************************

Thanks for your help.

Eric
 
M

Marina

Why do you want this? The users of your asp.net application are going to be
sitting at their desk accessing your site. So this would not apply to them.

If the person logged into the server needs notepad, why are they browsing
to a site located on the same machine, instead of just running an executable
locally that can launch appropriate programs?
 
S

Steve C. Orr [MVP, MCSD]

Normally a server is running without anyone attending it.
Therefore the default ASPNET user account does not have a desktop.
However, not all hope is lost.
Go into Administrative Tools, Services.
Right click on the WWW Service and select properties.
On the "Log On" tab you'll see a checkbox that says "Allow service to
interact with desktop".
Play around with these settings and you might be able to get it to work the
way you envision.
 
E

Eric

I am using this as a "push" to the machines in our intranet.

I need to launch applications on the client machines. I suppose there is a
better way to create a network stream on the client, listening for commands
from the server. I'm trying to use the Web server as an easy out.

Do you know of a .NET class I should be using? NetworkStream?

Eric
 
E

Eric

Hi Steve,

I've tried setting "Interact with desktop" for the www server, but that
didn't help.

Eric
 

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,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top