I've tried to allow impersonation on a WCF duplex channel, however it is always complaining (InvalidOperationException at runtime) that one of my callback method does not allow impersonation. Sample code below: [ServiceContract(Namespace = "MyNamespace", SessionMode = SessionMode.Allowed, CallbackContract = typeof(IMyContractCallback))] public interface IMyContract { [OperationContract(IsOneWay = false)] void Method1(string param); } public interface IMyContractCallback { [OperationContract(IsOneWay = false)] ReplyData Callback1(); } [DataContract(Namespace = "MyNamespace")] public class ReplyData { public ReplyData(object data) { this.data = data; } [DataMember] public object data; } Implementation: Set service host ImpersonateCallerForAllOperations to true: serviceHost.Authorization.ImpersonateCallerForAllOperations = true; Allow impersonation to Implementing Methods: [OperationBehavior(Impersonation = ImpersonationOption.Allowed)] public void Method1(string param) { ... } [OperationBehavior(Impersonation = ImpersonationOption.Allowed)] public ReplyData Callback1() { ... } I always got the error message below: System.InvalidOperationException: The service operation 'Callback1' that belongs to the contract with the 'IMyContract' name and the 'MyNamespace' namespace does not allow impersonation. at System.ServiceModel.Dispatcher.SecurityValidationBehavior.WindowsIdentitySupportRule.Validate(ServiceDescription description) at System.ServiceModel.Dispatcher.SecurityValidationBehavior.System.ServiceModel.Description.IServiceBehavior.Validate(ServiceDescription description, ServiceHostBase serviceHostBase) at System.ServiceModel.Description.DispatcherBuilder.ValidateDescription(ServiceDescription description, ServiceHostBase serviceHost) at System.ServiceModel.Description.DispatcherBuilder.InitializeServiceHost(ServiceDescription description, ServiceHostBase serviceHost) at System.ServiceModel.ServiceHostBase.InitializeRuntime() at System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout) at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) at System.ServiceModel.Channels.CommunicationObject.Open() Did I forgot to set something? Thanks in advance for the help. :)
(:)