Solved

windows service help

Posted on 2009-04-01
5
280 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now