• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 137
  • Last Modified:

Service won't run program properly without being logged in

Hello Experts,

I have a program that writes emails to a database.  It's a service that checks the inbox of a support system and then logs them into a database.  Simple, right?

Problem is that the service won't function properly unless I'm logged in!  It acts like its working, I can see the emails that are in the inbox go from the inbox to the logged in folder I made, but the service doesn't write to the database or anything..help!

It can read the database, but it won't do any insert/updates...what the heck?

Thanks,

Kevin


Open in new window

0
carmodyk
Asked:
carmodyk
3 Solutions
 
Shaun KlineLead Software EngineerCommented:
Are you connecting to your database using Windows authentication or SQL Server authentication? If Windows, have you confirmed that the account used to run the service has the ability to modify data in the database/table?
0
 
Paul MacDonaldDirector, Information SystemsCommented:
Yeah, this is a credentials issue - probably the credentials under which the service itself is running.  

You can either change the service credentials or change the connection string to include credentials to access the database.
0
 
frankhelkCommented:
I think the service is configured to run as "interactive user", which won't work w/o a user logged in.

Open the service settings (settings -> adminitrative tools -> Services, right click on service, properties). In the identity tab (or security ?) change to "Run as user" and enter name/password.

The try again.
0
 
carmodykAuthor Commented:
Yes it was a credentials issue, but one of windows.  When it was installed the service had the ability to read but not to write.  I have since fixed that and all appears to be well.  

Thank you all
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now