Click here to Skip to main content
15,861,125 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi frens


I want to open a windows app from browser ......i have used System.diagnostics.process.start();

and specied a path i.e, the path of the exe ........... it works fine wen run through visual studio but wen i run from IIS its throwing an error like : "the system cannot find the path specified " ..how can i set the path .....plz guide on this



Thanks darshan
Posted
Comments
deepakkavi 17-Jun-13 7:26am    
http://support.microsoft.com/kb/555134

You can't.

C# code is executed on the server, not the client. So when you execute
C#
Process.Start("MyApp.exe");
You are executing it on the server, so the server is where the instance of internet explorer is run - not the client. When you were in development, both the server and the client were the same machine, so it looked like it worked - but when you deployed to the web server, suddenly you can't see MyApp open because it is open on the server (which may be round the other side of the world) and is probably annoying the heck out of the Web server administration guy. Assuming the server has MyApp installed which is not a given - it is very unlikely that anything unnecessary is installed.

You cannot do what you want, except under very specific circumstances. Security will not allow you to execute applications (and certainly not specific applications which may or may not be installed) on a cline machine from the server. And the specific circumstances do not occur in 99% of circumstances.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900