I am learning WCF and I am stumped; why should i use this through a normal web service?
2 answers
You might not need to switch to WCF if a regular web service would work for you, however WCF covers more than just web services.
With WCF, you can use different communication channels (such as web services, MSMQ, named pipes ...) using the same endpoint service handler code.
WCF also has different built-in security mechanisms, allows for different serialization mechanisms (if something other than Soap is required, like raw JSON), hosting services without the need for a web project, etc.
As such WCF is a more generic service hosting infrastructure that can replace regular ASMX web services
+1
a source to share
Here is a nice article from msdn that talks about the differences between ASMX and WCF
Several key areas
- Serialization - Asmx uses XmlSerializer and WCF uses DataContractSerializer. Serializer Datacontract about 10% faster (source together with other information ) The differences between services and ASMX WCF
- Large protocol support (HTTP, TCP, ICP, MSMQ for WCF), ASMX only supports HTTP
0
a source to share