Click here to Skip to main content
15,877,168 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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.
Posted
Updated 23-Dec-11 5:57am
v2

1 solution

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.
 
Share this answer
 
Comments
codeprojectravi 23-Dec-11 11:56am    
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 in then it is working fine, i don't know why exactly it is working.Please provide help.
Wendelius 23-Dec-11 12:10pm    
What do you mean with mex address?
Monjurul Habib 24-Dec-11 2:47am    
5!
Wendelius 24-Dec-11 3:08am    
Thanks :)
codeprojectravi 24-Dec-11 9:17am    
it is mex endpoint address which can be used to test wcf service with WCF test client

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900