简体   繁体   English

WCF主机作为Windows服务故障

[英]WCF Host as windows service faults

I have this WCF service running as a window service. 我有此WCF服务作为窗口服务运行。

I have in my code that everytime it faults it will restart the service. 我的代码中每次出现错误都会重新启动服务。

Now I'm having the issue where the host faults, it tries to restarts, then faults again, but at some point it just stop the service. 现在,我遇到了主机出现故障的问题,它尝试重新启动,然后再次出现故障,但是在某个时候它只是停止了服务。

Wondering why it stop the service? 想知道为什么停止服务? Is this something handled by the OS that it detects the service has faulted a number of time within a certain time it will just stop the service because it faulted too many time ? 这是由操作系统处理的事情,它检测到服务在一定时间内发生了多次故障,因为故障时间过多而将停止服务吗?

I believe by default a service will only restart so many times. 我相信默认情况下,服务将仅重启多次。

  • Run service.msc 运行service.msc
  • Find your service 寻找您的服务
  • View the Recover tab in its properties dialog 在其属性对话框中查看“恢复”选项卡

尝试查看事件日志,必须有一些信息,以防万一窗口本身正在做某事。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM