Click here to Skip to main content
15,891,513 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Can anyone tell me if you can use the sspi security option in the connectionstring
to delegate the user credentials to the sql server?


EDIT:

Is this possible by using impersonation or delegation or both
Posted
Updated 29-Apr-14 3:22am
v2

1 solution

http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.connectionstring(v=vs.110).aspx[^] From that article it says, "If User ID and Password are specified and Integrated Security is set to true, the User ID and Password will be ignored and Integrated Security will be used."

So, no. If you use integrated security then it will not use the specified user name and password.
 
Share this answer
 
Comments
BELGIUMsky 29-Apr-14 9:08am    
i don't mean the username and password specified in the connectionstring

i want to use the passed username and password the client sends to the wcf service
ZurdoDev 29-Apr-14 9:18am    
In that case don't use SSPI. You just use a username and password in your connection string.
BELGIUMsky 29-Apr-14 9:23am    
and how can you set that username and password dynamicly in a wcf service? that uses username authentication mapped to windows active directory
ZurdoDev 29-Apr-14 9:32am    
I'm not sure. It may have something like impersonation. But I thought you said the username and password were being sent to the service?
BELGIUMsky 29-Apr-14 9:43am    
yes the client application will authenticate himself with username and password from within the organization(active directory) (this because the client application will not be in the domain) connection from behind the internet<br>
 <br>
that username and password should be mapped to the active directory windows account<br>
 <br>
because the sql server has some role based access the persons i create this service for want that these credentials are used to connect to the database

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