the .net core version of WCF is an open source project and only a subset of WCF:
https://github.com/CoreWCF/CoreWCF
you could check the issues.
note: MS recommends changing technology, say to gRPC.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
untering the error "Operation not supported on this platform" while attempting to consume a WCF service from .NET 8. The service is built in .NET Framework with wsHttp security. The implementation involves passing a username, password, and a certificate, yet the operation fails.
Is there a method to successfully consume services with this type of security? Various approaches have been explored without success.
The code in use is as follows:
var wsHttpBindingWithCredential = new WSHttpBinding();
wsHttpBindingWithCredential.Security.Mode = SecurityMode.Message;
wsHttpBindingWithCredential.Security.Message.ClientCredentialType = MessageCredentialType.UserName;
wsHttpBindingWithCredential.Security.Transport.ClientCredentialType = HttpClientCredentialType.Certificate;
wsHttpBindingWithCredential.Security.Message.EstablishSecurityContext = false;
var endpoint = new EndpointAddress("http://serviciotimbrefiscalprueba.dgi.gob.ni/TimbreFiscalDigital.svc");
var svctestclient = new TimbreFiscalDigitalClient(wsHttpBindingWithCredential, endpoint);
svctestclient.ClientCredentials.UserName.UserName = identity.user;
svctestclient.ClientCredentials.UserName.Password = identity.password;
svctestclient.Endpoint.Binding.SendTimeout = TimeSpan.FromMinutes(5);
svctestclient.Endpoint.Binding.ReceiveTimeout = TimeSpan.FromMinutes(5);
var store = new X509Store(StoreName.My, StoreLocation.CurrentUser);
store.Open(OpenFlags.ReadOnly);
var certs = store.Certificates.Find(
X509FindType.FindBySubjectName,
"timbrefiscal.dgi.gob.ni",
validOnly: false
);
if (certs.Count == 0)
{
throw new Exception("Certificate not found");
}
var clientCertificate = certs[0];
store.Close();
svctestclient.ClientCredentials.ClientCertificate.Certificate = clientCertificate;
svctestclient.Open();
the .net core version of WCF is an open source project and only a subset of WCF:
https://github.com/CoreWCF/CoreWCF
you could check the issues.
note: MS recommends changing technology, say to gRPC.
Hi,
Based on your issue and the error message "Operation not supported on this platform", you're encountering a known limitation in .NET 8 when trying to consume a WCF service using WSHttpBinding with message-level security and client certificates.
.NET Core and .NET 5+ (including .NET 8) do not fully support WSHttpBinding, especially with advanced security configurations like:
SecurityMode.Message
MessageCredentialType.UserName
Client certificates
This is because WCF in .NET Core/.NET 5+ is not fully implemented. Microsoft has not ported the full WCF stack to .NET Core/.NET 8. Instead, they recommend using CoreWCF, a community-driven project that aims to bring WCF server-side capabilities to .NET Core 1.
Here are some workaround options:
Option 1: Use CoreWCF (if you control the service)
If you have control over the WCF service, consider migrating it to CoreWCF, which supports many WCF features and is actively maintained.
GitHub: https://github.com/CoreWCF/CoreWCF
Notice: CoreWCF is primarily for server-side WCF. For clients, you still need to work around limitations in .NET.
Option 2: Use .NET Framework Client
If the service must remain as-is and uses wsHttpBinding with message security, the most reliable solution is to:
Create a .NET Framework class library (e.g., .NET 4.8)
Add your WCF client code there
Reference this library from your .NET 8 application via COM interop or gRPC bridge
This allows you to use the full WCF stack without rewriting the service.
Hope this helps.