SQL连接无法通过WCF服务进行响应 [英] Sql Connection not responding through wcf Service

查看:86
本文介绍了SQL连接无法通过WCF服务进行响应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我写的是使用nettcp绑定并托管为Windows服务环境的wcf应用程序.在具有sqlserver 2005数据库操作的wcf服务内部.当我在控制台模式下运行wcf服务时,一切正常.但是当我将其作为Windows服务运行时,Sql连接没有响应.
我正在使用Windows帐户启动服务,并使用Windows身份验证对Sql db.仍然有相同的问题.但是当我在端口8088中添加mex地址时,它工作正常.我不想使用mex端点.
请解决此问题.

Hi,

I am written wcf application which is using nettcp binding and hosted as windows service environment.Inside my wcf service having Sqlserver 2005 database operations. When i run my wcf service in console mode everything is working fine. but when i run it as a windows service Sql connection is not reponding.
I am using windows account to start services and using windows authentication to Sql db. still having same problem.But when i add mex address with port 8088 in then it is working fine. i don''t want to use mex endpoint.
Please help on this issue.

推荐答案

检查服务的凭据.如果在连接到SQL Server时使用Windows身份验证,则该服务必须在有权访问SQL Server的凭据下运行.例如,LocalSystem无法访问网络资源.
Check the credentials for your service. If you use windows authentication when connecting to SQL Server the the service must be run under credentials which have access to SQL Server. FOr example LocalSystem cannot access network resources.


这篇关于SQL连接无法通过WCF服务进行响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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