[英]Exec external EXE in C# WebService not working
I have a WebService that a program should run any exe. 我有一个WebService,程序应该运行任何exe。 Made the implementation of the service, I made a test case and the process works.
做了服务的实现,我做了一个测试用例和流程工作。
But if I call the WebService, the exe is not initialized. 但是如果我调用WebService,则exe不会被初始化。 I can not ententer the reason it does not boot
我无法确定它无法启动的原因
Configuracoes.Configuracao.URL = "C:\WA.exe";
code: 码:
protected override object DoConsulta(ArgumentoDaConsulta argumentos)
{
try
{
var exec = Configuracoes.Configuracao.URL;
Process.Start(exec);
return exec;
}
catch (Exception ex)
{
return ex.Message;
}
}
转到services.msc,右键单击您的服务,然后在选项卡LOGON上检查允许服务与桌面交互。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.