启动Windows Service应用程序时出现问题 [英] problem in in starting the windows service application

查看:85
本文介绍了启动Windows Service应用程序时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将Windows Service应用程序作为service..service启动时出现问题,然后启动几秒钟,然后停止并返回错误

//停止,如日志或其他组件..

problem in in starting the windows service application as service..service is starting for few seconds and then stopped and return the error

//stopped like log or other components..

推荐答案

通常在服务无关时发生.
在这种情况下,它会在几秒钟后开始和停止.
检查您的代码,了解服务是否在做任何事情.
如果找不到任何解决方案,请考虑调试该服务.
This generally happens when the service has nothing to do.
In such cases, it starts and stops after a few seconds.
Check you code if service is doing anything or not.
If you can''t find any solution, consider debugging the service.


因此,找出错误所在,使用事件日志或以其他方式记录错误
So figure out what the error is, use the event log or otherwise log the error


这可能是由于代码中的运行时异常所致,您在开发/测试阶段并未获得该异常.正如Mark所言,系统事件日志可以帮助您跟踪错误.
It may be due to a runtime exception in the code ,which you have not obtained during the development/testing phase.As told by Mark, the system event log can help you to trace the error.


这篇关于启动Windows Service应用程序时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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