SQL 2000 Connection problem in Windows Service asp.net c#

  • 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)

Viewing 0 posts

You must be logged in to reply to this topic. Login to reply