NetTalk Central

Author Topic: Probs with app running as a Service  (Read 3302 times)

Richard I

  • Sr. Member
  • ****
  • Posts: 398
    • View Profile
    • Email
Probs with app running as a Service
« on: February 18, 2021, 05:25:58 PM »
I have issues when an application is running as a Service and I need help please.
I have a  desktop  Clarion 10 application  with SelfService 3.53 and String Theory 3.35 installed

When running, this application performs clock controlled tasks from the Timer embed
It all works to expectation when running on the destop.

The code in the Timer  embed  is largely in routines
However when running as a Service, specifically, the creation and  export of a CSV file does not occur
The code for the CSV export is in a routine

Are there any known issues with Routines in an app running as a Service?
or is it something else?

Thanks
Richard

Jane

  • Sr. Member
  • ****
  • Posts: 371
  • Expert on nothing with opinions on everything.
    • View Profile
    • Email
Re: Probs with app running as a Service
« Reply #1 on: February 18, 2021, 07:43:45 PM »
Is your export to a local folder, a mapped drive, a UNC path, or ?

By default, your service is probably running as LOCAL SERVICE, which has no permissions to other stuff on the network.  Although not relevant to your present issue, LOCAL SERVICE may also not have a default printer.

As a test, try changing the service's account to use your credentials instead of LOCAL SYSTEM and see if it starts working.

Jane

Richard I

  • Sr. Member
  • ****
  • Posts: 398
    • View Profile
    • Email
Re: Probs with app running as a Service
« Reply #2 on: February 18, 2021, 08:21:44 PM »
Thanks Jane,
Just to reiterate, the app is an ordinary Clarion app with Self Service added to it.
When its running as a Service its Credentials appear to be correct as .\svc.timepeace and not LOCALHOST
In the properties the address path is correct and "log in as local system "is unticked with "this account" selected, requiring a password.

The  CSV file is created daily, is not printed , nor is it sent to Excel , rather it is copied into another folder on the host PC., date named, waiting to be picked up by the user.

Please Note that the application behaves perfectly and creates and exports the file as anticipated WHEN it is running on the desktop from a shortcut...
Its only when running as a Service that it doesn't respond.

I remain suspicious ( without foundation) of the code Routine from within the Timer embed, that runs the  creation of the file , WHEN it is running as a Service.

Cheers
Richard





Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Probs with app running as a Service
« Reply #3 on: February 20, 2021, 03:52:08 AM »
>> Are there any known issues with Routines in an app running as a Service?

there are no issues with routines in services. If there were nothing would work.

>> or is it something else?

yes.

The most likely culprit is that you are running the service under the service account, not the user account, and so your CSV file is being placed in some "relative" position (where you're not seeing it) or into a folder that that service account does not have access to. You might be better off running the service under a user account.

cheers
Bruce