1) What are the differences between WebService and WCF?
S.N Features WebService WCF
o 1 Hosting It can be hosted in IIS It can be hosted in IIS, windows activation service, Self-hosting, Windows service 2 Programmin [WebService] [ServiceContract] attribute g attribute has to be has to be added to the added to the class class 3 Model [WebMethod] [OperationContract] attribute represents attribute represents the the method exposed method exposed to client to client 4 Operation One-way, Request- One-Way, Request- Response are the Response, Duplex are different different type of operations operations supported in supported in web WCF service 5 XML System.Xml.serializati System.Runtime.Serializati on name space is on namespace is used for used for serialization serialization 6 Encoding XML 1.0, XML 1.0, MTOM, Binary, MTOM(Message Custom Transmission Optimization Mechanism), DIME, Custom 7 Transports Can be accessed Can be accessed through through HTTP, TCP, HTTP, TCP, Named pipes, Custom MSMQ,P2P, Custom 8 Protocols Security Security, Reliable messaging, Transactions 9 State Web Services are WCF Services can manage Management stateless states
2) What are the differences between ASP.Net Web services
and .NET Remoting?
S.N Features ASP.Net Web .NET Remoting
o services 1 Protocol It can be accessed only It can be accessed over HTTP over any protocol (including TCP, HTTP, SMTP and so on) 2 State Web services work in a It provides support for Management stateless environment both stateful and stateless environments through Singleton and SingleCall objects 3 Type System Web services support Using binary only the datatypes communication, .NET defined in the XSD Remoting can provide type system, limiting support for rich type the number of objects system that can be serialized.
4 Interoperabilit Web services support .NET remoting requires
y interoperability across the client be built platforms, and are using .NET, enforcing ideal for homogenous heterogeneous environment. environments 5 Reliability Highly reliable due to Can also take the fact that Web advantage of IIS for services are always fault isolation. If IIS is hosted in IIS not used, application needs to provide plumbing for ensuring the reliability of the application
6 Extensibility Provides extensibility Very extensible by
by allowing us to allowing us to intercept the SOAP customize the different messages during the components of the serialization and .NET remoting deserialization stages. framework. 7 Ease-of- Easy-to-create and Complex to program. Programming deploy.
3) What are the differences between Buffered Transfer and
Streamed Transfer in WCF?
S.N Buffered Transfer Streamed Transfer
o 1 Target can process the Target can start processing the message once it is completely data when it is partially received. received. 2 Performance will be good Performance will be good when when message size is small message size is larger(more than 64K) 3 Native channel shape is Native channels are IDuplexSessionChannel IRequestChannel and IReplyChannel
4) What are the differences Binary Serialization and XML
Serialization?
S.N Binary Serialization XML Serialization
o 1 It preserves type fidelity , It does not preserve type fidelity which is useful for preserving and hence state cant be the state of the object maintained between transportation and invocation 2 As it is the open standard its Not that much used compared to widely used Binary Serialization