my client on server A calls a service on B, which calls a service on C.
To get a call from B-> C, I have to do this:
channel.Credentials.Windows.ClientCredential =
new System.Net.NetworkCredential("WndowsUserName", "WindowsPassWord");
IService1 service = channel.CreateChannel();
etc...
the username and password are the Windows credentials used from A-> B Of course I don't want to do it hard, so how can I do it without hardcoding?
I tried, no luck:
WindowsIdentity callerWindowsIdentity =
ServiceSecurityContext.Current.WindowsIdentity;
using (callerWindowsIdentity.Impersonate())
Tom
source
share