想在web端程序控制某个service的启动 停止,怎么做?
解决方案 »
- 内容页如何触发母板页控件事件
- object的事件如何去响应?
- 求js验证上传图片格式,大小代码,thank you ...
- 在内容页中添加frameset 框架里不能加载对应的页面 急~~
- 如果我在一个页面过多的使用了ascx控件,会不会影响这个页面的执行速度?
- Session出错是怎么了啊
- 運行ASP.net頁面的時候,出現的一個問題
- asp.net中DataSet与数据库绑定的问题 求助大虾 急!谢
- 救命啊!为什么安装树型控件会失败?
- 有没有办法让页面自动跳转回上一级页面(有两个页面可以同时跳转到这个页面),其实就是后退的效果!
- 点击页面的按钮就会PostBack回来,CheckBox的状态就没法保存
- 问个问题.................................................................................
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");
ServiceController ctl = new ServiceController();
ctl.MachineName = "GUOXIN";
ctl.ServiceName = "Service Center";
ctl.Start();
出错:System.ComponentModel.Win32Exception: 拒绝访问。