AllowedImpersonationLevel = TokenImpersonationLevel.Delegation Stopped Working on Version Later Than v4.4.2
See original GitHub issueDescribe the bug
I have a WCF client with settings as below:
var binding = new BasicHttpBinding(BasicHttpSecurityMode.Transport);
binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Windows;
var address = new EndpointAddress($"https://myserviceendpoint.com/service.asmx");
var channelFactory = new ChannelFactory<T>(binding, address);
channelFactory.Credentials.Windows.AllowedImpersonationLevel = TokenImpersonationLevel.Delegation;
It works fine on WCF packages v4.4.2. But when I updated the packages version to v4.7.0 (Latest stable at the time of writing) then it seems like the ImpersonationLevel = TokenImpersonationLevel.Delegation
is not working anymore.
My code still compiles, but I got an error thrown from the web service side related to the impersonation settings.
Referenced packages:
System.ServiceModel.Duplex
System.ServiceModel.Http
System.ServiceModel.NetTcp
System.ServiceModel.Security
Additional context
The web service that I am consuming is built using .NET asmx web service technology.
With system.web
settings as below:
<authentication mode="Windows"/>
<identity impersonate="true"/>
No other security settings are involved in this scenario.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
WindowsClientCredential.AllowedImpersonationLevel ...
This property specifies the impersonation level granted by the client to the server when using Windows SSPI Negotiate authentication. Note that the ...
Read more >c# - Problems passing delegated credentials with WCF
What we are trying to do is, to have a WCF service, using WSHttpBinding, sitting on Server A that, when called, takes the...
Read more >https://raw.githubusercontent.com/dotnet/samples/m...
NET framework (4, 4.6) it works. The same code in .net core 2 throws `NullReferenceException`. The problem has something to do with column...
Read more >K2 blackpearl Services Reference 1 - PDF Free Download
Iterate through the category server building endpoints with SmartObject bindings for every category and subcategory found that has not specifically been marked ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@AbeBaehaki thanks for reporting this. Looks like this is a problem with SocketsHttpHandler that WCF depends on. We will investigate further and update this issue with our findings.
In the meantime as a workaround could you try adding AppContext.SetSwitch(“System.Net.Http.UseSocketsHttpHandler”, false); at the start of your app?
@mconnew gentle ping?