Click here to monitor SSC
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase

SQL 2000 Connection problem in Windows Service c# Expand / Collapse
Posted Monday, August 27, 2012 5:18 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, August 27, 2012 5:12 AM
Points: 2, Visits: 0
I'm trying to connect window service with sql server 2000. on other four servers, it is working perfectly.
But on 3 servers, i'm getting above error while opening connection in window service which i found in application log.
I've used the correct connection sting with user id and password in app.config. The same connection string working in web service without any problem. Even when i try to connect this server in Management Studio with these userid and password, It connects with sql server management studio. But it is giving above error in window service with same userid and password...
I'm using the connection string in app.config is-:
<add key="Connectionname" value="Data Source=ServerName;Initial Catalog=harland;Persist Security Info=True;User ID=UserID;Password=Password" />

The Error is -:
Service cannot be started. System.Data.SqlClient.SqlException: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)
at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
Post #1350319
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse