I am trying to execute an installed program which was installed in the client machines and it should be executed while clicking a button from my asp.net web application. Since I am newer to this I am struck in the middle and help me out to sort out the program.
I showed my sample java script code here with for your reference.
function RunEXE1() {
try {
var oShell = new ActiveXObject("WScript.Shell");
var oExec = WshShell.Exec("c:\\WINDOWS\\system32\\notepad.exe");
}
catch (err) {
alert(err.Message);
}
Kindly help me out and let me know that is there any other way to do this action than JS.
Unfortunately, this is your only alternative. by nature, IIS is not supposed to run applications on the client machine due to security concerns. Imagine for a minute if the web server was allowed to force you to run a nepharious command like fdisk with a
bunch of command line switches, a web server in that context would render your hdd useless. Think of the virus/botnet/worm implications, while your intentions may be noble, the web server simply won't do what you are asking it to do. You can do process.start
for commands but that will only execute on the web server itself.
Mark as answer posts that helped you.
Marked as answer by bbcompent1 on Jan 07, 2013 10:52 AM
Much Thanks for your prompt reply :-). But I need a clarification, i am going to access a program which is going to process calls and it should be going to record the audio file. is it possible to run that file from server and work in client machine?
I sincerely doubt it. The only way that you could hope to do that would be to create a winforms client/server application. Webforms/asp.net will not permit that type of relationship. You could record the audio on the server and then offer a download link
to the client as an option.
Mark as answer posts that helped you.
Marked as answer by bbcompent1 on Jan 07, 2013 10:52 AM
I sincerely doubt it. The only way that you could hope to do that would be to create a winforms client/server application. Webforms/asp.net will not permit that type of relationship. You could record the audio on the server and then offer a download link
to the client as an option.
Oh okie then Thanks too! I move on with some other alternatives...
Priyadharshn...
Member
4 Points
44 Posts
Run a program installed in local machine from asp.net web page
Jan 07, 2013 10:24 AM|LINK
Hi,
Good day to all, hope you working fine.
Here I need a favour from you.
I am trying to execute an installed program which was installed in the client machines and it should be executed while clicking a button from my asp.net web application. Since I am newer to this I am struck in the middle and help me out to sort out the program. I showed my sample java script code here with for your reference.
function RunEXE1() {
try {
var oShell = new ActiveXObject("WScript.Shell");
var oExec = WshShell.Exec("c:\\WINDOWS\\system32\\notepad.exe");
}
catch (err) {
alert(err.Message);
}
Kindly help me out and let me know that is there any other way to do this action than JS.
Thanks in advance!
Regards,
Priyadharshni.
bbcompent1
All-Star
33873 Points
8776 Posts
Moderator
Re: Run a program installed in local machine from asp.net web page
Jan 07, 2013 10:29 AM|LINK
Unfortunately, this is your only alternative. by nature, IIS is not supposed to run applications on the client machine due to security concerns. Imagine for a minute if the web server was allowed to force you to run a nepharious command like fdisk with a bunch of command line switches, a web server in that context would render your hdd useless. Think of the virus/botnet/worm implications, while your intentions may be noble, the web server simply won't do what you are asking it to do. You can do process.start for commands but that will only execute on the web server itself.
Priyadharshn...
Member
4 Points
44 Posts
Re: Run a program installed in local machine from asp.net web page
Jan 07, 2013 10:39 AM|LINK
Much Thanks for your prompt reply :-). But I need a clarification, i am going to access a program which is going to process calls and it should be going to record the audio file. is it possible to run that file from server and work in client machine?
Priya.
bbcompent1
All-Star
33873 Points
8776 Posts
Moderator
Re: Run a program installed in local machine from asp.net web page
Jan 07, 2013 10:44 AM|LINK
I sincerely doubt it. The only way that you could hope to do that would be to create a winforms client/server application. Webforms/asp.net will not permit that type of relationship. You could record the audio on the server and then offer a download link to the client as an option.
Priyadharshn...
Member
4 Points
44 Posts
Re: Run a program installed in local machine from asp.net web page
Jan 07, 2013 10:48 AM|LINK
Oh okie then Thanks too! I move on with some other alternatives...
Anyhow thanks for your favour.
Regards,
Priyadharshni.