What is the difference between Webservice and WCF

Answer Posted / ashish

1 File Format/Extension :
i) ASP.net service - '.asmx'
ii) WCF service - '.svc'

2 Hosting :
i) ASP.net service - Can be hosted in IIS also can be hosted in a Windows Service.
ii) WCF service - Very flexible, can be hosted in IIS, Windows Activation Services(WAS), Managed Windows Services and It also supports Self-Hosting.

3 Transport Protocols/Binding :
i) ASP.net service - It supports HTTP & TCP protocols along with custom binding.
ii) WCF service - supports HTTP, WS-HTTP, TCP, Custom, Named Pipes, MSMQ & P2P(Point to Point) etc.

4 Data Transformation :
i) ASP.net service - XML serializer for Data Transformation.
ii) WCF service - DataContractSerializer for Data Transformation.

5 Serialization NameSpace :
i) ASP.net service - System.XML.Serialization
ii) WCF service - System.RunTime.Serialization

6 Supported Operations :
i) ASP.net service - only One-Way and Request-Response type.
ii) WCF service - Includes One-Way, Request-Response and Duplex.

7 Encoding :
i) ASP.net service - It uses following encoding mechanisms -
XML1.0, MTOM (Message Transmission Optimization Mechanism), DIME (Direct Internet Message Encapsulation)
ii) WCF service - It uses following encoding mechanisms -
XML1.0, MTOM, Binary

Read more differences here - http://www.csharptutorial.in/2012/01/cnet-difference-between-web-service-and.html

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What threading model used in asp and asp.net?

571


Is it possible to apply themes to an asp.net application? If yes, then how?

575


In What Order Do The Events Of An Aspx Page Execute. As A Developer Is It Important To Undertsand These Events?

574


How to store checkbox value in database in asp.net mvc? : Asp.Net MVC

513


Explain the use of dataadapter.

574






In order to get assembly info which namespace we should import?

522


How do you remove duplicates without using remove duplicate stage?

613


Why web api is better than wcf?

554


What is a web api endpoint?

533


Disable browser cache for entire ASP.NET website?

663


What is application variable?

515


What are session and cookies?

534


What is a SESSION and APPLICATION object?

578


How can we identify that the Page is Post Back?

555


Define page fragment caching?

524