Run .exe on client system from server-side c# code

前端 未结 4 601
我在风中等你
我在风中等你 2020-12-20 02:32

I want to run an exe on client system from my c# asp.net website. When I use Process.Start() it throws an error:

The requested operation

4条回答
  •  执笔经年
    2020-12-20 03:18

    You can't spawn processes on the client machine from server-side code.

    When you use Process.Start in server-side code, it is attempting to execute the process there, on the server where the website is hosted. If you wanted to create processes on the clients computer then you would need to expose a download for them (and not in employing subterfuge, like malign sites might do to install software - supply it gracefully, and normally (and with permission)), or a Silverlight application or something along those lines.

    The bottom line is that the code you want to execute (even if that is just to spawn a process) must reside on the client, and be executed there.

提交回复
热议问题