2012년 3월 13일 화요일 오전 11:11
I have 2 windows based services. Lets asume Service-A and Service-B.
Service-A internally calls Service-B. But all users uses Service-A. Service-A provides response based on called user (based on windows account). At the same time Service-B also provides the response based on called user.
Now my querry is, how can I pass called user credentials to Service-B from Service-A. Currently I am using below code to pass client creditials from one servie to another service. But its not working. Let me know if you have any idea.
this.serviceobj.ClientCredentials.Windows.ClientCredential = OperationContext.Current.ServiceSecurityContext.PrimaryIdentity as System.Net.NetworkCredential;
2012년 3월 13일 화요일 오전 11:55
Add this to your method implementation:
[OperationBehavior(Impersonation = ImpersonationOption.Required)]
This will impersonate the caller fron Service A to Service B
Add this to your service behavior:
<serviceAuthorization impersonateCallerForAllOperations="true" />
What i'm talking about comes from this article:
2012년 4월 3일 화요일 오전 9:26Thank you it worked for me :)