无法启动windows服务 [英] Cannot start the windows service

查看:36
本文介绍了无法启动windows服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个 WCF 库,然后我编写了一个 WCF 服务,该服务可以创建或打开文件并编写hello world"在那个文件中.然后我向 Windows 服务添加了一个新项目.在该 Windows 服务 onstart() 方法中,我调用了 WCF 服务,然后使用 installutil 构建并安装了该服务.服务已成功安装,当我在services.msc中启动服务时,显示以下错误

I created a WCF library, then I wrote a WCF service which can create or open a file and writes "hello world" in that file. Then I added a new project to a Windows service. In that Windows service onstart() method I call the WCF service, then I build and installed the service using installutil. The service was installed successfully, while i am starting the service in services.msc, it shows the following error

本地计算机上的服务启动然后停止了一些服务自动停止.如果他们没有工作要做,例如性能日志和警报.

the service on local computer started and then stopped some services stopped automatically. if they have no work to do, for example the performance logs, and alerts.

为什么我会收到这个错误,我该如何解决?

Why am i getting this error, how can I resolve it?

推荐答案

(i) 清除应用程序日志.

(i)Clear the Application Log.

(ii) 使用调试器并跟踪 OnStart() 方法的执行.

(ii)Use the debugger and trace the execution of the OnStart() method.

如果这些都不起作用,

1) 从开始按钮点击运行命令

1) Click Run Command from start button

2) 输入Services.msc,然后点击确定,您将获得计算机中的所有服务.

2) Enter Services.msc then click OK,you will get all the services in your computer.

3) 选择您的服务并右键单击该服务并选择属性

3) Select your service and right click on the service and select Properties

4) 转到登录属性,选择本地系统帐户,然后单击确定

4) Goto Logon Properties a select Local System Account then click OK

这篇关于无法启动windows服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆