AllowedImpersonationLevel = TokenImpersonationLevel.Delegation Stopped Working on Version Later Than v4.4.2
- Dominant language
- C#
- Stars
- 1.8k
- Forks
- 576
- Avg merge
- 6d 9h
- Merged PRs (30d)
- 2
Description
**Describe the bug**
I have a WCF client with settings as below:
```csharp
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(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:
```xml
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:
```xml
```
No other security settings are involved in this scenario.
Contributor guide
Assessment
This issue has not been assessed yet.