Connection SqlServer 2012 via Windonws service

0

I created a windows service for monitoring to send data ( OS info , proc , ram etc) to my sqlserver database it work fine on my computer , I already installed the service in another machine that have sqlserver and it can connect to mydatabase successfully but when the service run it appear those error in service log , I did some research but I did not find anything useful , your are my last hope guys

2020-07-22 15:09:34.7392 - DEBUG: Starting service 2020-07-22 15:09:34.7392 - DEBUG: Callback started 2020-07-22 15:09:34.7392 - DEBUG: Starting sending Data 2020-07-22 15:09:35.1712 - ERROR: System.Data.SqlClient.SqlException (0x80131904): Échec de l'ouverture de session de l'utilisateur 'AUTORITE NT\ANONYMOUS LOGON'. at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling, SqlAuthenticationProviderManager sqlAuthProviderManager) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource1 retry, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource1 retry, DbConnectionOptions userOptions) at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource1 retry) at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource1 retry) at System.Data.SqlClient.SqlConnection.Open() at SignalRbus.InfoManager.SendData() in C:\Users\Rayen\source\repos\project\SignalRbus\SystemInfo.cs:line 197 at DetailService.Service1.serviceTimer_callback(Object state) in C:\Users\Rayen\source\repos\project\DetailService\Service1.cs:line 45 ClientConnectionId:a19ffe41-1f72-4e44-a883-f4eed400e93e Error Number:18456,State:1,Class:14 ClientConnectionId :00000000-0000-0000-0000-000000000000 Error Number :-1,State :0,Class :20

c#
.net
sql-server-2012
windows-services
asked on Stack Overflow Jul 22, 2020 by rayen

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0