Thursday, 20 March 2014

Difference webservice and wcf

Web service was the old traditional way to exposing the business logic and functionality to outside world through HTTP protocol. Microsoft has introduces new way to exposes into outside world not only through the HTTP protocol but also TCP, Remoting etc.It is proving high security and reliable messaging. 
Finding below the Difference  between WebService and WCF service.


SNO
Type
Web Service
WCF
1
Consume By
web services support only HTTP
WCF supports HTTP, TCP, MSMQ, NamedPipes.
2.
Hosting
web services can be hosted only in IIS
WCF service has all the following hosting options: a. IIS b. WAS (Windows Process Activation Services) c. Console Application d. Windows NT Services e. WCF provided Host
3.
Security
Webservice security is limited, it provide authentication and authorization is done using IIS and ASP.NET security configuration and transport layer security.
it supports many of the same capabilities as IIS and WS-* security protocols, additionally, it provides support for claim-based authorization that provides finer-grained control over resources than role-based security.
4.
Threading
It doesn’t support the multithreading
It support multithreading via ServiceBehaviour Class
5.
Serialization
web services uses XmlSerializer for serialization
WCF uses DataContractSerializer which is far better in performance than XmlSerializer
6.
Supports
It Support SOAP and XML
It support different types of Bindings like WSHttpBinding, BasicHttpBinding, MSMQBinding etc.
7
Transaction
It doesn’t support Transaction
It supports atomic and distributed transactions.
8
Proxy Class Creation
Uses the Command line tool WSDL.EXE to generate the client for the service.
Use serviceMetaData tool (svcutil.exe) to generate the client for service.

2 comments:

  1. Hi,
    Please change the proxy class creation difference in WCF and webservices


    Thanks
    Ravi kiran N

    ReplyDelete

Others

You will like to read it