Duplicate: Is it possible to run an executable from a web service?
重复:是否可以从Web服务运行可执行文件?
Hi
I have Webservice, and I want to run exe file through this Webservice
我有Webservice,我想通过这个Webservice运行exe文件
the Webservice and the exe file are on same computer
Webservice和exe文件在同一台计算机上
How can I do it ?
我该怎么做 ?
thank's in advance
提前致谢
Process.Start()?
You can use the System.Diagnostics.Process object to start an external process.
您可以使用System.Diagnostics.Process对象来启动外部进程。
EDIT:
Example using some advanced features (input/output/error redirecting). It's in VB, but should be easy to port.
使用一些高级功能(输入/输出/错误重定向)的示例。它在VB中,但应该很容易移植。
Process.Start("path of the program");
Process.Start("app.exe")
OR even better, wrap it in a Windows Service, publish a schema for it and consume through async request to a bus.
或者甚至更好,将其包装在Windows服务中,为其发布架构并通过异步请求使用到总线。
本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:http://www.silva-art.net/blog/2009/06/01/256b81bc121de3b5366df52994774aa3.html。