ASP.NET and Executables

K

ken.beaudry

I hope that someone can answer this. I work in a call center, and
we are upgrading some of our systems. I need to find out if there
is a way for an ASP.NET page to call and execute an EXE file on the
local machine. Our new dialing platform is web-based and no longer
client-side. Some of our applications use a custom digital
recording solution which I need to call an executable to start.

ANY HELP WOULD BE GREATLY APPRECIATED.

Thank you
 
M

Mark Rae

I need to find out if there is a way for an ASP.NET page to call and
execute an EXE file on the local machine.

Not under normal circumstances, for security reasons... Imagine a malicious
website which ran "format c:" or "del c:\*.*" on the browser machine, and
this become fairly obvious... :)

However, it sounds like you have an enclosed intranet environment, so you
could write an ActiveX control which would do what you require. Of course,
you would need to ramp down the browser security a bit etc.

I have done similar things with client-side Office automation...

Writing an ActiveX controls isn't particularly difficult in Visual
Studio.NET:
http://www.c-sharpcorner.com/UploadFile/dsandor/ActiveXInNet11102005040748AM/ActiveXInNet.aspx
 
J

John Timney \(MVP\)

Easiest way is to use sockets - in that your asp.net app would talk to a
local client app via the machine IP address and a simple socket connection,
telling it to invoke the digital recording solution. The recommended
approach would be to use an activeX control in the browser with enough
permissions to talk to your local exe, or to investigate how far you can get
with VBScripts objShell.Exec in the browser.

Regards

John Timney (MVP)
http://www.johntimney.com
http://www.johntimney.com/blog
 
P

Peter Bradley

Ken Beaudry said:
I hope that someone can answer this. I work in a call center, and
we are upgrading some of our systems. I need to find out if there
is a way for an ASP.NET page to call and execute an EXE file on the
local machine. Our new dialing platform is web-based and no longer
client-side. Some of our applications use a custom digital
recording solution which I need to call an executable to start.

Hi Ken,

What determines whether or not the executable should be started or not?

When you start it, do you want it to just run indefinitely, or do you want
to stop it again some other time? If you want to stop it, what determines
that it should be stopped?

Do you want calls to start/stop the executable to be synchronous or
asynchronous (I'm guessing the latter)?


Peter
 
E

Eliyahu Goldin

You can either make an ActiveX control or use a Windows WSH call like this:

function callExe() {
var myShell = new ActiveXObject( "WScript.shell" );
myShell.run( '"mycommand.exe", ... some other parameters are here...);
}

In either case you will have to rely on the user to allow a special security
to your site.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
 
K

ken.beaudry

I tried the wsh, and it will execute an EXE on the server, but it
didn't run on the client
 
K

ken.beaudry

if at all possible, could someone help out with the source for an
activeX control to execute an EXE on the local machine from ASP.NET,
this is not my forte, and I would be grateful for any assistance.

THANK YOU
 

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,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top