I want to pass credential of my application pool identity account to WCF service with in application ,I can get credential of application pool identity using
var identitipoolAccountCred = System.Security.Principal.WindowsIdentity.GetCurrent();
and I want to convert these credential (System.Security.principal.WindowsIdentity
) to type network credential type of (System.Net.NetworkCredential
) to pass WCF channel factory.
So How to convert windows identity to network credential in C#?