Get Password In Client
I send UserName & Password(Login Form) Form Client in the proxy to the server by this coding
myProxy.ClientCredentials.UserName="UserName";
myProxy.ClientCredentials.Pasword="Password";
In addition Our ClientCredentialType Must be MessageCredentialType.UserName.
in the server I need UserName & Password For Impersonate User to Make Log in the SQLSERVER with the same User that send Request to Server.
So For this I need to get Sending开发者_如何学运维 Password in the Server And I don't Know How Must I do it?
for get UserName I Use this Code ServiceSecurityContex.Current.PrimeryIdentity.Name
The password authenticates the user to the proxy; the proxy won't pass this information on. You'd need to explicitly pass the password to the service via the proxy to have this information available.
精彩评论