Difference between BasicHttpBinding and WsHttpBinding
· BasicHttpBinding is there only to support the old .ASMX style of working and aimed for clients who do not have .NET 3.0 installed. So the BasicHttpBinding it’s there mainly for compatibility reasons.
· ASMX (without the WS enhancements) does not support secure messaging. When a client calls an operation on a service, all data in the payload is send as a plain XML, human readable, SOAP packet.
· It also does not support reliability and ordered delivery.
· When a call is lost somewhere, the client is not informed and just waits for a timeout and cannot know for sure if the call has arrived at the server and if the logic behind it got executed.
· Also lacking in the basic profile is ordered delivery. This means when a client fires multiple calls to the service it’s not guaranteed that they arrive in the same order. Maybe somewhere a router could drop a packet allowing the second call to arrive earlier than the retransmission of the first. This can lead to disasters, which cannot be allowed in enterprise solutions.
· The WSHttpBinding fully supports these requirements on security, reliability and ordered delivery. Some of them as default, others have to be configured.
· WSHttpBinding uses (as the name implies) the WS-* protocols. This results in having some additional handshake messaging and This means that not only SOAP requests are sent for the operation calls but also to have the client and service agree on some context and to inform each other on the success of the calls.