Solved

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

Posted on 2004-04-02
9
349 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:knowlton
  • 5
  • 3
9 Comments
 
LVL 5

Author Comment

by:knowlton
Comment Utility
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 250 total points
Comment Utility
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:knowlton
Comment Utility
The services control panel?
0
 
LVL 12

Expert Comment

by:dfiala13
Comment Utility
What's the Logon account being used by the service?
What account do you logon under?
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 5

Author Comment

by:knowlton
Comment Utility
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 250 total points
Comment Utility
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:knowlton
Comment Utility
Are talking about mixed authentication versus NT Authentication?
0
 
LVL 5

Author Comment

by:knowlton
Comment Utility
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
Comment Utility
If you are using windows authentication then the windows account the service is running under comes into play.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

771 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

8 Experts available now in Live!

Get 1:1 Help Now