How to Run an external within a ASP.NET page

G

Guest

Good Day Folks,

I want to run calc.exe from within an asp.net page. I'm using the following
code. When I run it I don't get any errors but nothing happens. What's
missing ?

<%@ Page Explicit="True" Language="VB" Debug="true"%>
<%@ Import Namespace="System.Diagnostics" %>
<html>
<head>
<title></title>
</head>
<body>

<%
dim p as Process = new Process()
p.StartInfo.WorkingDirectory = "C:\windows\system32"
p.StartInfo.FileName = "calc.exe"
p.Start()
%>

</body>
</html>
 
N

Norman Yuan

So, you want to run a Windows desktop app (Calc.exe) on the web server? No,
it is not allowed for IIS to pop up a window form app.

Even it is allowed somehow, how a user, who might sit in front of a web
browser very far from the server, can see the calculator on the server,
which may not have a dedicated monitor at all?
 
G

Guest

Hi Norman,

Thanks for your reply. I don't want calc.exe to run on the server, but to
run in the client's browser. I've seen this sort of thing with java, ie a
java app running in a jvm in a browser. I was hoping asp.net could do
something similar.

Thanks again.
/Serge


Norman Yuan said:
So, you want to run a Windows desktop app (Calc.exe) on the web server? No,
it is not allowed for IIS to pop up a window form app.

Even it is allowed somehow, how a user, who might sit in front of a web
browser very far from the server, can see the calculator on the server,
which may not have a dedicated monitor at all?
 
N

Norman Yuan

So, you want to start a win app from web browser at user end. This can only
be done with client end script (javascript). This will have nothing to do
with ASP.NET (at most, you may use ASP.NET to register some client end
javascript code that does that). It also possible that the web browser's
security setting simply does not allow it to happen.

Serge said:
Hi Norman,

Thanks for your reply. I don't want calc.exe to run on the server, but to
run in the client's browser. I've seen this sort of thing with java, ie a
java app running in a jvm in a browser. I was hoping asp.net could do
something similar.

Thanks again.
/Serge
 

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

Top