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.

Why WSHttpBinding convert to CustomBinding ?

See original GitHub issue

I am using WCF Connected Service to generate the WCF client code , I see some code like this –

Why when endpointConfiguration = WSHttpBinding then create a CustomBinding, are they total compatible ?

        private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration)
        {
            if ((endpointConfiguration == EndpointConfiguration.WSHttpBinding_IExchangeRateService))
            {
                System.ServiceModel.Channels.CustomBinding result = new System.ServiceModel.Channels.CustomBinding();
                System.ServiceModel.Channels.TextMessageEncodingBindingElement textBindingElement = new System.ServiceModel.Channels.TextMessageEncodingBindingElement();
                result.Elements.Add(textBindingElement);
                System.ServiceModel.Channels.HttpTransportBindingElement httpBindingElement = new System.ServiceModel.Channels.HttpTransportBindingElement();
                httpBindingElement.AllowCookies = true;
                httpBindingElement.MaxBufferSize = int.MaxValue;
                httpBindingElement.MaxReceivedMessageSize = int.MaxValue;
                result.Elements.Add(httpBindingElement);
                return result;
            }
            throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration));
        }

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
zhenlancommented, Jan 25, 2017

Sorry for my brevity @bc3tech. Please let me explain.

This issue is about “why WSHttpBinding convert to CustomBinding” in the code generated by WCF Connected Service. The answer to that is because WSHttpBinding is currently not supported. I understand CustomBinding may not work for all scenarios as an alternative solution. To ultimately solve this issue, it requires the support of WS*Binding, which is tracked in #31. There is nothing more for this issue to track and thus closed. Does this make sense to you?

0reactions
viktorpeacockcommented, Feb 11, 2019

Is there any workarounds? I tried creating custom bindings, but there is a mismatch between Soap 1.1 and 1.2.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Convert wsHttpBinding to customBinding - wcf
It creates a custom binding via code, mofifies its clock skew, ... binding based on an existing binding CustomBinding myCustomBinding = new ...
Read more >
WCF Binding Box: Converting WsHttpBinding to a ...
The Wcf Binding Box is an online WCF binding converter. You supply it with your current binding and it returns you an equivalent...
Read more >
WCF CustomBinding Equivalent to WSHttpBinding
Here is the CustomBinding equivalent to the WSHttpBinding defaults (windows authentication): Update: Convert bindings automatically using the WCF BindingBox ...
Read more >
Binding In WCF: Part 11
Binding is a mechanism by which communication details are specified to make connection to a service endpoint. Each endpoint in WCF service ...
Read more >
BindingBox: Convert WCF Bindings
The WCF BindingBox is here! What is it? BindingBox is an online application that converts WCF bindings to a customBinding configuration.
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