Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
8
Erster Beitrag:
vor 2 Jahren, 9 Monaten
Letzter Beitrag:
vor 2 Jahren, 6 Monaten
Beteiligte Autoren:
Sivaprakash, Yaku, Michael Drechsel, Stefan.kern

Re: Windows Service - trying to stop - gives error

Startbeitrag von Sivaprakash am 25.09.2015 13:45

Hello,

using Windev 20 66r
Creating Windows Service

WD Service supplied with Windev. When I execute the exe supplied with Windev, this program works great. But after compiling with Windev 20, when I execute the same program (exe), I get error while trying to stop the service. This error occurs whenever I try to stop the service, either through windows interface or through the same exe. The error message is :

Failure sending the command to the SERVICE service.
System Error Details: The service did not respond to the start or control
request in a timely fashion.


Eventually the services is stopped, but the above error appears. What would be reason for this error. Surprise is that the exe supplied with Windev work fine with no error. Probably it's been compiled with earlier version of Windev, I presume.

Any solution to overcome this problem, as I'm planning to use ver 20. only.

Happiness Always
BKR Sivaprakash

Antworten:

Re: Windows Service - trying to stop - gives error

Hello,

Exactly this command gives the above error.

ServiceStop(ServiceName)

If compiled in windev 20. Any work around ?

Happiness Always
BKR Sivaprakash

von Sivaprakash - am 27.09.2015 03:53

Re: Windows Service - trying to stop - gives error

Hi,

if you stop a Service, the Service gets the stop command from the Windows Service control Manager (as well as start, resume, pause etc).

Normally the Service should respond after a given time, if the Service does not respond within this give time, the error you mentioned occurs.

So you should check, wheather there is a Long process in the "called in the Loop" section of the Service, which is not finished (a thread, database Operation etc.).


Best Regards

Stefan-

von Stefan.kern - am 27.09.2015 14:41

Re: Windows Service - trying to stop - gives error

Hello,

This Service just writes free memory space in the event log. That's all.

This is not a program written by me, but supplied with windev (WD Service). If I execute the Exe supplied, with windev, it works perfect. If I compile in Windev 20, without modifying anything, and execute that exe I get the error.

Happiness Always
BKR Sivaprakash

von Sivaprakash - am 28.09.2015 01:24

Re: Windows Service - trying to stop - gives error

Hello,

The below command is executed

ServiceWriteEventLog("Elifa - reading the available memory space" + CR + SysSpace() + " bytes ", elInformation)

Happiness Always
BKR Sivaprakash

von Sivaprakash - am 28.09.2015 09:54

Re: Windows Service - trying to stop - gives error

Hi Sivaprakash,
have you solved this problem yet? I'm having the same issue...
I mean, installing and uninstalling a service via .exe is cool, but not so much if the program freezes when you try to uninstall the service..

von Yaku - am 19.12.2015 11:05

Re: Windows Service - trying to stop - gives error

Hi,

the windev example is wrong

// Pause during 60 seconds
Wait(6000, waitTimer)

Change "wait" to "Servicewait" and everything works.

von Michael Drechsel - am 21.12.2015 15:11

Re: Windows Service - trying to stop - gives error

Hi Michael,
Thank you for your tip, it really works now like a charm

von Yaku - am 22.12.2015 07:43
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.