How to Run an external within a ASP.NET page

  • Thread starter Thread starter Guest
  • Start date Start date
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>
 
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?
 
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?
 
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
 
Back
Top