无法打开计算机窗口服务'。“在窗口申请 [英] cannot open window service on computer '.' in window application
本文介绍了无法打开计算机窗口服务'。“在窗口申请的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我开发一个窗口应用程序,我也创造了一个服务。我开始使用窗口申请编码服务,但我得到一个错误,例如电脑上无法打开的窗口服务'。
I develop one window application and I also create one service. I start the service using coding in window application, but I am getting an error like cannot open window service on computer '.'
我用下面的代码
ServiceController controller = new ServiceController("SeoMozScheduleService");
if (controller.Status == ServiceControllerStatus.Stopped)
{
controller.Start();
}
如果我的应用程序点击右键,点击以管理员身份运行比它正常工作我...
If i right click on Application and click on Run as Administrator than it works fine for me...
推荐答案
转到
C://程序文件/ ApplicationFolder / .EXE
右键单击.exe和去属性,然后去保持兼容标签,并选中真正运行此程序作为管理员级别。
Go to c://Program Files/ApplicationFolder/.exe Right click on .exe and go to Properties then go Compability Tab and check true to Run this Program as an administrator Level.
这篇关于无法打开计算机窗口服务'。“在窗口申请的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文