WCF Services provides
all the capabilities of .Net Web Services and further extend it. Simple
and basic difference is that ASMX web service is designed to send and receive
messages using SOAP over HTTP only. While WCF service can exchange
messages using any format (SOAP is default) over any transport protocol (HTTP,
TCP/IP, MSMQ, NamedPipes etc.).
ASMX Webservices is simple but limited in many ways as compared to WCF Service.
§
ASMX web services can be hosted only in IIS whileWCF service has
all the following hosting options:
§
IIS
§
WAS (Windows Process Activation Services)
§
Console Application
§
Windows NT Services
§
WCF provided Host
§
ASMX web services support is limited to HTTP while WCF supports HTTP, TCP, MSMQ,
NamedPipes.
§
ASMX Security is limited. Normally authentication and
authorization is done using IIS and ASP.NET security configuration and
transport layer security. For message layer security, WSE can be used.
WCF provides a consistent security programming model for any protocol and 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. WCF security is consistent regardless of the host that is used to implement WCF service.
WCF provides a consistent security programming model for any protocol and 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. WCF security is consistent regardless of the host that is used to implement WCF service.
§
Another major difference is that ASMX web services uses XmlSerializer for serialization while WCF usesDataContractSerializer which
is far better in performance than XmlSerializer.
Key Issues with XmlSerializer in serializing .NET types to xml are:
Key Issues with XmlSerializer in serializing .NET types to xml are:
§
Only public fields or properties of the .NET types can be
translated to Xml.
§
Only the classes that implement IEnumerable can be translated.
§
Classes that implement IDictionary, such as Hashtable cannot be
serialized.
Reference: http://www.topwcftutorials.net/2012/06/wcf-vs-asmx-web-services.html
No comments:
Post a Comment