为什么自我制作(.net)工人服务作为Windows服务给出“错误1067:该过程意外终止”在开始待办事项时?
我在.NET中创建了一个Worker Service,并计划将该服务部署到Windows机器,因此我将其创建为Windows服务。 当我开始部署服务(使用sc.exe)时,一切都顺利进行,直到我尝试启动服务并遇到错误:“错误1067:该过程意外终止”。 它确实在我的开发机器中启动,因此问题必须与目标计算机相关。
“谷歌搜索”的答案对我没有太大帮助,并且可以分散。 什么可能导致此错误?
I created a worker service in .NET and I planned to deploy that service to windows machine so I created it as windows service.
When I started deploying the service (using sc.exe), everything went smoothly until I tried to start up the service and I got error: "Error 1067: The process terminated unexpectedly".
It did start up in my dev machine so the problem must be related with the target machine.
Answers from "googling" didn't help me much and were kind of disperse.
What might cause this error?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
对我来说,解决方案很简单。我的目标机器缺少我的服务试图使用的目录。我将适当的目录和文件夹添加到我的开发机器中,错误消失了。
For me the solution was simple. My target machine was missing the directory that my service was trying to use. I added the proper directory and folder into my dev machine and the error was gone.
我经历了这个问题,当我将其移至服务器时,这只是文件夹的仅阅读许可。 =/
I experienced this issue, it was simply a read-only permission on folder when I moved it to the server. =/