WCF Interview questions

Total available count: 25
Subject - Microsoft Technologies
Subsubject - WCF

Differences between web services and WCF?

Certain differences are there between Web services and WCF which tells WCF is better than Web services in the terms of usage. Several important differences are given below,
Web services:
1. Web service supports only IIS (Internet Information Services) Hosting
2. [WebService] and [WebMethod] attributes are required to develop a web service
3. Web service can be accessed through HTTP only
4. Web service can be accessed through WSDL.EXE to generate client proxy and it can be customized through ServiceDescriptionFormatExtension class
5. It doesn't support Multithreading programming
6. It supports only SOAP or XML bindings
7. Only public fields and properties can be translated into XML
8. Only the classes which implements IEnumerable and ICollection interface can be serialized
9. Overall performance is slow when compare to WCF
10. Hash table can not be serialized through web services
1. WCF can be hosted not only in IIS but also Windows activation service, Self-hosting, Windows service
2. [ServiceContract] and [OperationContract] attributes are required to develop a WCF
3. WCF can be accessed through HTTP, TCP, MSMQ, P2P and Named pipes
4. SVCUTIL.EXE is required to access the WCF service in client machine to genrate proxy class or it can be accessed through Visualstudio by adding a web reference
5. It supports Mutlithreading programming
6. It supports BasicHTTPBinding, WSHTTPBinding, WSDualHTTPBinding, WsFederationHttpBinding, NetNamedPipeBinding etc
7. DataContract and DataMember attributes can be serialized
8. IDictionary interface can also serialized in WCF
9. Performance is better than web services
10. Hash table can be serialized through WCF
11. It can be used in distributed systems and it supports SOA architecture