473,405 Members | 2,344 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

How to Run an external within a ASP.NET page

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>

--
Thanks in advance
/Serge

Nov 23 '05 #1
4 1351
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?

"Serge" <Se***@discussions.microsoft.com> wrote in message
news:AC**********************************@microsof t.com...
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>

--
Thanks in advance
/Serge

Nov 23 '05 #2
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" wrote:
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?

"Serge" <Se***@discussions.microsoft.com> wrote in message
news:AC**********************************@microsof t.com...
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>

--
Thanks in advance
/Serge


Nov 23 '05 #3
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" <Se***@discussions.microsoft.com> wrote in message
news:91**********************************@microsof t.com...
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" wrote:
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?

"Serge" <Se***@discussions.microsoft.com> wrote in message
news:AC**********************************@microsof t.com...
> 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>
>
> --
> Thanks in advance
> /Serge
>


Nov 24 '05 #4
You cannot do this. IE cannot access the machine's resources.

"Serge" <Se***@discussions.microsoft.com> wrote in message
news:AC**********************************@microsof t.com...
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>

--
Thanks in advance
/Serge

Nov 24 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Richard Speiss | last post by:
I am trying to display a random background image for a webpage. I found this code to do it <% 'Defines the number of background images you have Const NUMBER_OF_IMAGES = 2 'Initiates the...
1
by: John B. | last post by:
In an effort to turn a little more a module with my pages, I would like to turn my internal javascripts into an external javascript files to supply the information onto a web page. I...
9
by: Charley Kyd | last post by:
I'm a newbie who needs advice about how to use external files of JavaScript code. I spent an hour this afternoon browsing through JavaScript books at the local book store. In about 15 different...
17
by: CES | last post by:
All, I was wondering if their is a way of loading an external script fill from within a script?? <script language="javascript" type="text/javascript"> function test(var){ <script...
38
by: Neo Geshel | last post by:
I am seeking a method to load one JS file directly into another, *without* having to dynamically write <scripttags. Is there any method whereby I can call only one external JS file using a ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.