Closed thuannguy closed 1 year ago
Well, the workaround that I found is changing from:
.AddServiceEndpoint<HelloWorld, IHelloWorld>(new WSHttpBinding(SecurityMode.Transport), "/wsHttp");
To
var myWSHttpBinding = new WSHttpBinding(SecurityMode.Transport);
myWSHttpBinding.Security.Transport.ClientCredentialType = HttpClientCredentialType.None; // this line is the key
...
.AddServiceEndpoint<HelloWorld, IHelloWorld>(myWSHttpBinding, "/wsHttp");
Which sample is the bug for I use the NetCoreServer sample.
Describe the bug The sample throws an exception after upgrading all CoreWCF packages to the latest versions.
To Reproduce Steps to reproduce the behavior:
Error message: System.InvalidOperationException: 'Unable to resolve service for type 'Microsoft.AspNetCore.Authentication.IAuthenticationSchemeProvider' while attempting to activate 'Microsoft.AspNetCore.Authentication.AuthenticationMiddleware'.'
Stack trace:
Expected behavior The sample should work with the latest CoreWCF versions, or could anyone please give me some ideas about how to get it work? I can then contribute a PR to fix the sample.
Repo environment: