Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
5
Erster Beitrag:
vor 2 Jahren, 9 Monaten
Letzter Beitrag:
vor 2 Jahren, 9 Monaten
Beteiligte Autoren:
willy hermans, Danny Lauwers, DarrenF, stefan.kern

Service stopped unexpectectly

Startbeitrag von willy hermans am 07.05.2015 15:21

Hello,

I've build a service with windev 18

It looks into a map for files with a specific extention
it connect to a HFSQL database to a server on the internet and copies the content into a memofield.

After installing it controles the existence of a map and make the map if required.

But the service stops after execution. When I restart the service there comes a popup

The service is started but then stopped . Some services stops automatically because they not used by other services or other programs.

Someone an idea what I am doin wrong.

Thanks

Willy Hermans

Antworten:

Willy,

Have you got any error trapping in your service?

von DarrenF - am 07.05.2015 15:38
Hi Willy,

have you checked the windows built in event viewer?
May be you will find any hints here.

A service runs in the windows user context "system", which is a user with very high rights, but with some limits.
E.g. the user "system" is not allowed to print.
May be your service trys to do some operations who are not allowed for the user system.
Try by running the service in the user context of a normal user with admin rights.

Best Regards

Stefan.

von stefan.kern - am 08.05.2015 22:35
I've rebuilded the service line by line and tested line by line.

And there was an error. One file was not linked with a connection in the analysys.

It works fine in a WinDev and Webdev application because I use

// Opening the connection
HOpenConnection(New_Connection)
HChangeConnection("*",New_Connection)

at the start of the site, app and now the also the service.

I've also learned that it is best to make an app with a button. When this works fine you can copy the working code to a new service-project.

Thanks for the helping hand.

Willy Hermans

von willy hermans - am 09.05.2015 06:08
Willy,

You can also combine the service and a windows app in 1 project and switch between them when needed. Your code can be mostly the same and you can selective compile for service or windows app. Then you don't need to copy and paste between projects.

Have a nice day
Danny

von Danny Lauwers - am 09.05.2015 20:50
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.