Click here to Skip to main content
15,890,724 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi all,

I have created an asp.net web application.

From my web application I am executing one simple windows based .exe file(.net application which is created by me).
It's working well in my local PC, but when I configure that web application in client pc through(IIS), my web application is not executing that exe file (which is created by me).

This is my code

C#
System.Diagnostics.Process myProces = new System.Diagnostics.Process();
       myProces.StartInfo.FileName = @"C:\\WindowsFormsApplication2.exe";
       myProces.Start();


Please guide me to rectify this issue.
Posted
Updated 14-Aug-11 21:39pm
v2
Comments
Dalek Dave 15-Aug-11 3:39am    
Edited for Grammar, Readability and Code Block.

That is because the code is executed at the server, not the client.

You cannot start any application directly on the client machine - that is counted as "probable virus activity" and rightly prevented.

When you tested it, the application was executing, but on the server rather than the client. It looked as if it worked because the client and the server were the same PC. Right now, you probably have a rather annoyed Webserver admin who has a server running a couple of dozen little applications...
 
Share this answer
 
Comments
Simon Bang Terkildsen 15-Aug-11 3:32am    
you beat me to it, by a few miliseconds :)
Abhinav S 15-Aug-11 4:00am    
Nice analysis. 5.
Your application is executed on the server side (the PC your ISS is located at)

If you want the application to start on the client side I would suggest you look into ClickOnce[^]. But if you don't understand the difference between client side and server side in a web application then you should properbly take a few steps back and start out small.
 
Share this answer
 
v2

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