Why WSHttpBinding convert to CustomBinding ?
See original GitHub issueI 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:
- Created 7 years ago
- Comments:11 (4 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

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?
Is there any workarounds? I tried creating custom bindings, but there is a mismatch between Soap 1.1 and 1.2.