WCF Difference FAQs-1

Difference between basicHttpBinding and wsHttpBinding

Security support
This supports the old ASMX
style, i.e. WS-BasicProfile 1.1.
This exposes web services using WS-*
This is aimed for clients who do
not have .NET 3.0 installed and it
supports wider ranges of clients.
Many of the clients like Windows
2000 still do not run .NET 3.0. So
older version of .NET can
consume this service.
As its built using WS-* specifications, it
does not support wider ranges of client
and it cannot be consumed by older
.NET version less than 3 version.
Soap version
SOAP 1.1
SOAP 1.2 and WS-Addressing
Not supported. In other words, if
a client fires two or three calls
you really do not know if they
will return back in the same
Supported as it supports WS-*
Default security
By default, there is no security
provided for messages when the
client calls happen. In other
words, data is sent as plain text.
As WsHttBinding supports WS-*, it has
WS-Security enabled by default. So the
data is not sent in plain text.
Security options
Windows – default authentication
Transport with message credentials

Difference between Message and Transport level security in WCF

Criteria Transport Security Message Security
Scenarios when we should be using one of them When there are no intermediate systems in between this is the best methodology.

If it’s an intranet type of solution this is most recommended methodology.
When there are intermediate systems like one more WCF service through which message is routed then message security is the way to go.
Advantages Does not need any extra coding as protocol inherent security is used.

Performance is better as we can use hardware accelerators to enhance performance.

There is lot of interoperability support and communicating clients do not need to understand WS security as it’s built in the protocol itself.
Provides end to end security as it’s not dependent on protocol. Any intermediate hop in network does not affect the application.

Supports wide set of security options as it is not dependent on protocol. We can also implement custom security.

Disadvantages As it’s a protocol implemented security so it works only point to point.

As security is dependent on protocol it has limited security support and is bounded to the protocol security limitations.
Needs application refactoring to implement security.

As every message is encrypted and signed there are performance issues.

Does not support interoperability with old ASMX webservices

Difference between Buffered transfer and Streamed transfer in WCF
S.No Buffered Transfer Streamed Transfer
1 Target can process the message once it is completely received. Target can start processing the data when it is partially received.
2 Performance will be good when message size is small Performance will be good when message size is larger(more than 64K)
3 Native channel shape is IDuplexSessionChannel Native channels are IRequestChannel and IReplyChannel

Difference between WCF and Web Services

S.No Features WebService WCF
1 Hosting It can be hosted in IIS t can be hosted in IIS, windows activation service, Self-hosting, Windows service
2 Programming [WebService] attribute has to be added to the class [ServiceContract] attribute has to be added to the class
3 Model [WebMethod] attribute represents the method exposed to client [OperationContract] attribute represents the method exposed to client
4 Operation One-way, Request- Response are the different operations supported in web service One-Way, Request-Response, Duplex are different type of operations supported in WCF
5 XML System.Xml.serialization name space is used for serialization System.Runtime.Serialization namespace is used for serialization
6 Encoding XML 1.0, MTOM(Message Transmission Optimization Mechanism), DIME, Custom XML 1.0, MTOM, Binary, Custom
7 Transports Can be accessed through HTTP, TCP, Custom Can be accessed through HTTP, TCP, Named pipes, MSMQ,P2P, Custom
8 Protocols Security Security, Reliable messaging, Transactions
9 State Management Web Services are stateless WCF Services can manage states

No comments:

Post a Comment