Solved

windows service help

Posted on 2009-04-01
5
282 Views
Last Modified: 2013-12-17
I'm developing a windows service that will be used as a file import utility.  If I install the service under a local user account and use my network credentials, the service fires up and runs fine.  but if I try to run it under the Local System account, I get the generic error:

The XXXXX service on local computer started and then stopped.  Some services stop automatically if they are not in use by other services or programs.

Any ideas on what would cause this?  Am I missing a setting somewhere?

0
Comment
Question by:jb09376
5 Comments
 
LVL 26

Expert Comment

by:Anurag Thakur
ID: 24039379
are you trying to access some foldes and write to those folders etc?
you are getting some kind of exception - most likely user access issues and i will recommedn you to log the exception and in case its user permission then you might have to use your netowk credientials to run the application
0
 
LVL 7

Accepted Solution

by:
badbearontour earned 50 total points
ID: 24051205
we had the same problem and it is indeed user credentials issue, the system account has no access to the file system.
from memory we used the networkService accoutn on the machine and gave that user account access to the resources, that did the trick.
We have also in the past created a new user account in the domain and given that access to the resources, then set the login details of the service to that user account. We also checked the interact with desktop box, if the service popped any warnings

BB
0
 
LVL 11

Expert Comment

by:Mihai Stancescu
ID: 24084313
Try to check the Event Log after receiving that message box, and see the error a bit more clearly.


Hope this helps!


Regards,
Mishu
0
 

Author Comment

by:jb09376
ID: 24162348
correct badbear.  I found parts of the code referencing the HKEY_LOCAL_USERS part of the registry, which the system account does not have access to.
0
 
LVL 7

Expert Comment

by:badbearontour
ID: 24192240
great, at least you found it...

BB
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question