Link to home
Start Free TrialLog in
Avatar of Tom Knowlton
Tom KnowltonFlag for United States of America

asked on

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

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.
Avatar of Tom Knowlton
Tom Knowlton
Flag of United States of America image

ASKER

Here is my current connection string:

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

This works for other apps just fine.
ASKER CERTIFIED SOLUTION
Avatar of AdrianJMartin
AdrianJMartin

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The services control panel?
Avatar of dfiala13
dfiala13

What's the Logon account being used by the service?
What account do you logon under?
Administrator  (and admin pw as well)

Isn't this just a logon for the service itself   (not for the database connection later on?)
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Are talking about mixed authentication versus NT Authentication?
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?
If you are using windows authentication then the windows account the service is running under comes into play.