Solved

Service won't run program properly without being logged in

Posted on 2014-09-19
4
129 Views
Last Modified: 2014-09-20
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
Comment
Question by:carmodyk
4 Comments
 
LVL 26

Assisted Solution

by:Shaun Kline
Shaun Kline earned 100 total points
ID: 40333261
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
 
LVL 34

Accepted Solution

by:
Paul MacDonald earned 300 total points
ID: 40333263
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
 
LVL 14

Assisted Solution

by:frankhelk
frankhelk earned 100 total points
ID: 40333264
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
 
LVL 6

Author Closing Comment

by:carmodyk
ID: 40334591
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

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

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

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
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…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

860 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