为什么自我制作(.net)工人服务作为Windows服务给出“错误1067:该过程意外终止”在开始待办事项时?

发布于 2025-02-03 16:32:35 字数 208 浏览 5 评论 0原文

我在.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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

年华零落成诗 2025-02-10 16:32:35

对我来说,解决方案很简单。我的目标机器缺少我的服务试图使用的目录。我将适当的目录和文件夹添加到我的开发机器中,错误消失了。

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.

绝不服输 2025-02-10 16:32:35

我经历了这个问题,当我将其移至服务器时,这只是文件夹的仅阅读许可。 =/

I experienced this issue, it was simply a read-only permission on folder when I moved it to the server. =/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文