Solved

Service won't run program properly without being logged in

Posted on 2014-09-19
4
123 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 25

Assisted Solution

by:Shaun Kline
Shaun Kline earned 100 total points
Comment Utility
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 33

Accepted Solution

by:
paulmacd earned 300 total points
Comment Utility
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 13

Assisted Solution

by:frankhelk
frankhelk earned 100 total points
Comment Utility
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
Comment Utility
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
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…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

743 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