1

I developed one windows service in c#. In this service i add one DLL. My service running fine till yesterday.How ever when i start my service from task manager it's give me error

The service did not respond to the start or control request in a timely fashion.

When i search this error and I found one solution that give "ServicesPipeTimeout" in registry but it also not working. I also restart my PC but it's also not work.

When I see the event Log It's give me the detail

Faulting application name: CronService.exe, version: 1.0.0.0, time stamp: 0x556d42ac Faulting module name: KERNELBASE.dll, version: 6.3.9600.16384, time stamp: 0x52158f2d Exception code: 0xe0434352

Can give me proper solution for this?

Kinjal Patel
  • 83
  • 3
  • 12
  • 1
    Have you checked Event Viewer -> Windows Logs -> Application -> Errors for any unhandled exceptions the service is throwing? – RagtimeWilly Jun 02 '15 at 05:49
  • I can't find windows log in Event viewr. In event viewer four panel is there 1)overview 2) summary 3)recently view nodes 4) Log summery. – Kinjal Patel Jun 02 '15 at 05:57
  • In the left hand panel there should be some folders; Custom Views, Windows Logs, etc – RagtimeWilly Jun 02 '15 at 05:59
  • **EVENT LOG DETAIL** Faulting application name: CronService.exe, version: 1.0.0.0, time stamp: 0x556d42ac Faulting module name: KERNELBASE.dll, version: 6.3.9600.16384, time stamp: 0x52158f2d Exception code: 0xe0434352 – Kinjal Patel Jun 02 '15 at 06:12
  • Are you sure it is related to your service? – Sandeep Jun 02 '15 at 06:22
  • It's give application name "CronService.exe" so i found that – Kinjal Patel Jun 02 '15 at 06:32
  • another log is **The process was terminated due to an unhandled exception.** but why this happen I don't know – Kinjal Patel Jun 02 '15 at 06:32
  • Debug your service to find out the root cause. Here is the msdn link on how to debug a window service https://msdn.microsoft.com/en-us/library/7a50syb3%28v=vs.110%29.aspx – Sandeep Jun 02 '15 at 07:04

3 Answers3

0

The usual reason is service constructor is taking a lot of time to initialize. Your service was running fine till yesterday, so you need to investigate what has added to the delay. As RagtimeWilly suggested, the first thing to check is the eventviewer. It would help if you can add your code and eventviewer details.

You can debug your service with a console application and check what is causing this delay.

Sandeep
  • 399
  • 5
  • 15
0

Uninstall your windows service and then install it again. It may works.

0

Check for lengthy operations in your services startup/ construction code. Also add some logging so you know what's happening.

gmn
  • 4,199
  • 4
  • 24
  • 46