C#에서 하나의 Windows 서비스를 작성한 다음 installutil을 통해 설치합니다. 이제는 서비스를 시작하려고 할 때 "Service cannot be started. System.Data.SqlClient.SqlException (0x80131904): Login failed for user 'Domain\MachineName$'.at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() 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.LoginNoFailover(ServerInfo serverInfo, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, TimeoutTimer timeout) at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, TimeoutTimer timeout, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlIn...
Windows 서비스에서 로그인하지 못했습니다.
테스트 중에 테스트했지만 확실하지 않은 애플리케이션은 잘 작동합니다.
도와주세요.
서비스가 연결을 만들 수 없습니다. app.config 파일의 연결 문자열을 확인하십시오. –
사용자 이름/비밀번호가 일치하지 않거나 서버 이름이 잘못되었습니다. 데이터베이스를 열고 (로컬)/(SQLExpress) 또는 모든 인스턴스를 사용하고 있는지 확인하고 연결 문자열 데이터 소스에 지정하십시오. – Sakthivel