Solved

windows service help

Posted on 2009-04-01
5
284 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

738 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