question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

netstandard 2.0 - support for TransportWithMessageCredential in BasicHttpsBinding

See original GitHub issue

Hello, question especially to @mconnew or anyone. I want to ensure that we have support for TransportWithMessageCredential in BasicHttpsBinding (not BasicHttpBinding) in netstandard 2.0.

In this site we can see support for BasicHttpBinding, but I’m guess that we have support also for BasicHttpsBinding. https://github.com/dotnet/wcf/blob/master/release-notes/SupportedFeatures-v2.0.0.md

This code throws NotSupportedPlatformException:

var binding = new BasicHttpsBinding(BasicHttpsSecurityMode.TransportWithMessageCredential)
                {
                };

but this code below doesn’t throw exception and looks like everything works. I’m not sure if everything is secured/implemented under hood:

var binding = new BasicHttpsBinding
                {
                    Security =
                    {
                        Mode = BasicHttpsSecurityMode.TransportWithMessageCredential
                    }
                };

This is reference to your source code: https://github.com/dotnet/wcf/blob/release/2.0.0/src/System.Private.ServiceModel/src/System/ServiceModel/BasicHttpsBinding.cs

This is some kind of bug in this code and I can use this code OR BasicHttpsBinding is only partially/not supported? I tried upgrade netstandard 2.0 to netstandard 2.1 but it looks like doesn’t help. Upgrade for my case is generally not a good idea because it’s a big cost.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:11
  • Comments:15 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
HongGitcommented, Jan 7, 2021

@imcarolwang could you please take a look and see if you could fix this? In the meantime, we probably should also looking into add test coverage to this (copy the existing test for BasicHttpBinding)

0reactions
mconnewcommented, Nov 5, 2021

@fptkolodziejczyk, in regard to Re.2, I don’t have enough information to say what’s going on. The server is returning a 503 error, so there’s something the server didn’t like about the request. You would need to contact the service owner to get assistance debugging tha. If the service is running WCF, you can also use svc?SingleWsdl in a browser and save the file to disk. Then you can point all the tooling such as svcutil to the save file. If it isn’t WCF and can’t use the SingleWsdl option, you can download the base wsdl, then examine it in a text editor and find all the imports specified, then go and download each of the imports. You might need to fix up the import statements in the wsdl if they are absolute paths, but once you’ve done that, then you can point the code generation tooling at the downloaded files. It’s less than ideal, but without knowing the root cause, it’s the only suggestion I have.

As for CustomBinding with an endpoint configuration name, that’s because we can’t support app.config in .NET Core as we rely heavily on a lot of stuff in the machine.config file. You need to configure your CustomBinding in code. If you are having difficulty translating your app.config configuration into the code equivalent, you can provide your config here and I can help you convert it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Net Core does not support WSHttpBinding - wcf
I am planning to move with BasicHttpBinding and made the following changes: var binding = new BasicHttpBinding(BasicHttpSecurityMode.
Read more >
Developers - netstandard 2.0 - support for ...
I want to ensure that we have support for TransportWithMessageCredential in BasicHttpsBinding (not BasicHttpBinding) in netstandard 2.0.
Read more >
WSFederationHttpBinding in .NET Standard
Implement scenarios that consume WCF services with WS-Federation bindings on .NET Core with the release of System.ServiceModel.Federation.
Read more >
<transport> of <basicHttpBinding> - .NET Framework
The following example demonstrates the use of SSL transport security with the basic binding. By default, the basic binding supports HTTP ...
Read more >
WSFederation is back!
Great news for everyone who has still some WCF services running. Until recently only BasicHttpBinding and NetTcpBinding were supported.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found