ImpersonationOption.Required does not work in wsHttpBinding
See original GitHub issueI’m trying to set [CoreWCF.OperationBehavior(Impersonation = CoreWCF.ImpersonationOption.Required)]
attribute on one of the WCF service method.
I’m using wsHttpBinding set up as follows:
var binding = new WSHttpBinding();
binding.Security.Mode = SecurityMode.Transport;
binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Windows;
Getting following error:
10:46:21 ERR] First chance exception occured System.InvalidOperationException: SecurityContextProperty is missing from the request Message, this may indicate security is configured incorrectly. at CoreWCF.Dispatcher.SecurityImpersonationBehavior.RunImpersonated2[T](MessageRpc rpc, ServiceSecurityContext securityContext, Boolean isSecurityContextImpersonationOn, Func`1 func) in D:\Odesk\Eddie\Radian_TFS\CoreWCF\src\CoreWCF.Primitives\src\CoreWCF\Dispatcher\SecurityImpersonationBehavior.cs:line 226
I might be doing something wrong, but client works with other service created on .Net Framework, but does not work with CoreWCF (.Net Core 5).
Attached is a patch with unit test that reproduces same issue.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
@birojnayak, it looks like you assigning it to Jon was successful.
@mconnew can you assign… I can’t assign to @jonlouie