?
Solved

Windows Service trying to write to database table...proglem logging in

Posted on 2004-04-02
9
Medium Priority
?
355 Views
Last Modified: 2010-04-15
I am getting the following SQLException:

      Message      "Login failed for user 'ITDEV\Administrator'."      string


~~~~~~~~~~~~~~

Now, I know that I can use SQL Server Enterprise Manager just fine.....and I can read and write to the table that I am trying to write to in my C# Windows Service.  I know that other parts of the Windows Service are running okay.
0
Comment
Question by:Tom Knowlton
[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
  • 3
9 Comments
 
LVL 5

Author Comment

by:Tom Knowlton
ID: 10743416
Here is my current connection string:

server=ITDEV;Trusted_Connection=yes;database=RedWall;

This works for other apps just fine.
0
 
LVL 5

Accepted Solution

by:
AdrianJMartin earned 1000 total points
ID: 10744180
Possible:
The windows service is running under the wrong account, i thin the default is 'local service', as a test,  in the services control panel change the log on account for your service to your ITDEV\administrator one, and see if it works.

0
 
LVL 5

Author Comment

by:Tom Knowlton
ID: 10744190
The services control panel?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 12

Expert Comment

by:dfiala13
ID: 10744201
What's the Logon account being used by the service?
What account do you logon under?
0
 
LVL 5

Author Comment

by:Tom Knowlton
ID: 10744220
Administrator  (and admin pw as well)

Isn't this just a logon for the service itself   (not for the database connection later on?)
0
 
LVL 12

Assisted Solution

by:dfiala13
dfiala13 earned 1000 total points
ID: 10744276
Depends on whether or not you are using mixed authetication for SQL Server or not.

If you are not, you need to supply ther SQL user ID and password the service will use to login in the connection string
0
 
LVL 5

Author Comment

by:Tom Knowlton
ID: 10744293
Are talking about mixed authentication versus NT Authentication?
0
 
LVL 5

Author Comment

by:Tom Knowlton
ID: 10744321
I am positive I use Windows NT authentication when creating a DSN  under   Data Sources (ODBC) in Administrative Tools.  These DSN entries are on the same machine I am testing the Windows Service on.

Does this help?
0
 
LVL 12

Expert Comment

by:dfiala13
ID: 10744369
If you are using windows authentication then the windows account the service is running under comes into play.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

752 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