在.net中创建窗口服务错误 [英] Creation of window service error in .net

查看:77
本文介绍了在.net中创建窗口服务错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在sql server.it中正在使用sa用户帐户正常工作。在窗口服务sql连接不起作用。

i在sql连接中使用窗口身份验证它无法正常工作.window服务正在创建这个问题,但窗口应用程序工作正常。请为此提供一些解决方案。



错误: -

服务无法启动。 System.Data.SqlClient.SqlException(0x80131904):用户'sa'登录失败。在System.Data.SqlClient.SqlInternalConnection.OnError(SqlException异常,布尔breakConnection)处于System.Data.SqlClient.ThrowExceptionAndWarning()处于System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior,SqlCommand cmdHandler,SqlDataReader dataStream,BulkCopySimpleResultSet) System.Data中的System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)处于System.Data的System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo,String newPassword,Boolean ignoreSniOpenTimeout,TimeoutTimer timeout,SqlConnection owningObject)中的bulkCopyHandler,TdsParserStateObject stateObj。 System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlis ...

解决方案

您需要授予访问权限NT AUTHORITY\NETWORK服务到你的个人数据库。

i am using sa user account in sql server.it is working fine.in window service sql connection is not working .
i used window authentication in sql connection it is not working .window service is creating this problem but window application is working fine.please give some solution for this.

Error:-
Service cannot be started. System.Data.SqlClient.SqlException (0x80131904): Login failed for user 'sa'. 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.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, SqlConnection owningObject) at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, TimeoutTimer timeout) at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlis...

解决方案

You need to grant access to 'NT AUTHORITY\NETWORK SERVICE' to your PERSONAL database.


这篇关于在.net中创建窗口服务错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆