Link to home
Start Free TrialLog in
Avatar of HotRod40
HotRod40

asked on

Service Application

I have created a Service Application that will call an executable inside a timer event.
My problem is that when the timer fires, the function to open the executable is made but the exe doesnt open.
When I try this on three other PC's all of different Operating Systems the Service works OK.
I know my problem is due to security on the offending PC but how and where do you look to configure security options to allow a Service access?

The PC that the Service doesnt work on is a Windows Server 2003. However I have tested the service on another Server 2003 PC and XP and 2000 and all work OK so it is the first Window Server 2003 that is the problem.

I know the code works as I have taken the Service code and placed it into a regular windows application and using a button click executed the code. And the program works.

Any help would be appreciated,
Thanks
ASKER CERTIFIED SOLUTION
Avatar of TheRealLoki
TheRealLoki
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of MikProg
MikProg

Any action in windows have result. What error code do you recieve if app does not started?
Avatar of HotRod40

ASKER

Thankyou for your suggestions.

I have tried logging the service on as the admin account but I receive a message showing:

   'MyAdmin has been granted the logon as a Service right'

MyAdmin being an administrator account.  What does this message mean?

In the mean time I will try to setup a specific account for the Service

Hi,

I now have my Service login correct by creating a specific account.
My problem now is that this service performs a sql query on a SQL Server database, counts the number of records and writes to a text file.
As my code reaches the open statement of the query, the Service restarts.
Why cant I run this query? I have placed the same code in a regular exe and there is no problem so I believe it is something to do with Services.

Thanks
So are you saying that the service is working now, but you have a different problem now?
I mean, does this SQL work in the service on the other server 2003? or is this new?

do  you have a try-except around your code, so you can catch any errors and log them (the event log might be a good place)
A common mistake I make when writing sql is I leave the database component connected at design time, and it then causes an error when I run it (trying to connect when already connected, or can not find the default database, etc)
make sure you have set any connected properties to false before you compile. Aside from that, I'll need a little more information. sSee if you can get an error message
try
...
except on e:exception do
 " save error" E.Message
end;
my suggestions appear to have resolved his first issue, but then he has a subsequent sql related issue which I asked for more information, and made some suggestions for. I have not heard back from him about this