如何在web程序里控制windows service
想在web端程序控制某个service的启动 停止,怎么做?
[解决办法]
try this :
Process p = new Process();
p.StartInfo.FileName = "cmd.exe ";
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardInput = true;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.RedirectStandardError = true;
p.StartInfo.CreateNoWindow = false;
string[] strOutput = new string[2];
p.Start();
p.StandardInput.WriteLine( "net start yourService ");
[解决办法]
提升你IIS的权限
[解决办法]
权限问题