What is the difference between Webservice and WCF
Answers were Sorted based on User's Feedback
Answer / srini
Asp.net web services are homogenous.
Asp.net web services can use only HTTP chanenel.
Not supports msmq and tcp binding...
WCF is flexible because its services can be hosted in
different types of applications. The following lists
several common scenarios for hosting WCF services:
IIS
WAS
Self-hosting
Managed Windows Service
WCF = Web services + .Net Remoting + MSMQ + (COM+)
Is This Answer Correct ? | 53 Yes | 8 No |
Answer / eswar
WebService Serves only HTTP Comunication Channel where as
WCF Servers Following Communication Channels
HTTP,TCP,MSMQ,NamedPipes.
Is This Answer Correct ? | 34 Yes | 3 No |
Answer / arif imteyaz
ASP.NET Web Method is called ASMX [because of the file
extension] (check 4GuysFromRolla about this, they have a
good tutorial)
That technology makes you expose functions as a Web Service
so you can connect it from everywhere and use it. But... you
can't protect the data between server and client, you can
send big files clear and know what happend, etc...
[Note] you can protect the access to the web service using
certificates, but it is complicated but normally, in ASMX we
use username / passsword.
in WCF, you are in the different world about Web
Services,and this s the best technology in .NET to expose
Services (can you see the difference... Services! not Web
Services), WCF does not need IIS to run, it can run as a
System Service on the server, using a console ambient (like
command line), etc, so we say that WCF is a Service not Web
Service. Remember ASMX need IIS to run.
with WCF you can use SSL to encrypt the communication (to do
that in ASMX you need to use WSE - Web Services
Enhancements), you can send big files and securely (to do
that in ASMX you need to use MTOM - Message Transmission
Optimization Mechanism).
you can set the transmission preferences just changing one
line of code, the security is much higher, etc, etc :)
hope you get a better general overview with this, but there
is much more.
bottom line: to expose Web Services that you do not need to
protect, you can use ASMX, no problem at all, but if you
need to protect the communication somehow, do it in WCF!
link: you can read here some performance comparative between
the 2 services
Is This Answer Correct ? | 10 Yes | 2 No |
Answer / rajneesh
webservice & wcf
webservice only on HTTP
wcf any protocol
WCF MOST big feature compare webservice
1. IIS Hosting & Self hosting
(Process Recycling)
2. service Behaviour(instancecontextmode
(Presession,single,percall) for Mantain session)
3.End Point(Address,Binding,Contract)
4.in wcf datacontact serializaton in webservice
xmlserialization
this were major point of WCF.
Rajneesh Hajela
Gwalior(M.P.)
Is This Answer Correct ? | 12 Yes | 6 No |
Answer / mohan
sp.net web services are homogenous.
Asp.net web services can use only HTTP chanenel.
Not supports msmq and tcp binding...
WCF is flexible because its services can be hosted in
different types of applications. The following lists
several common scenarios for hosting WCF services:
IIS
WAS
Self-hosting
Managed Windows Service
Is This Answer Correct ? | 7 Yes | 1 No |
Answer / manoj kumar chouhan
1. Web Service Support HTTP Protocol where as WCF support
HTTP,TCP,NamedPipes.
2. Web Service Hosted only IIS where as WCF hosted in
IIS,WAS(Windows Activation Service),MWS(Managed windows
Service and self Hosting.
3. In Web Service there is no concept of End point where as
in WCF there is End Poin(meaning if we want to change on
server side no need to change to client side)
Manoj Kumar Chouhan
Is This Answer Correct ? | 8 Yes | 3 No |
Answer / sriram
Web Service can host only HTTP protocol but WCF has support
any Protocol . WCF full of SOA services but web services
are not
Is This Answer Correct ? | 5 Yes | 4 No |
Answer / dhritirao
WCF is a replacement for all earlier web service
technologies from Microsoft. It also does a lot more than
what is traditionally considered as "web services".
WCF "web services" are part of a much broader spectrum of
remote communication enabled through WCF. You will get a
much higher degree of flexibility and portability doing
things in WCF than through traditional ASMX because WCF is
designed, from the ground up, to summarize all of the
different distributed programming infrastructures offered
by Microsoft. An endpoint in WCF can be communicated with
just as easily over SOAP/XML as it can over TCP/binary and
to change this medium is simply a configuration file mod.
In theory, this reduces the amount of new code needed when
porting or changing business needs, targets, etc.
ASMX is older than WCF, and anything ASMX can do so can WCF
(and more). Basically you can see WCF as trying to
logically group together all the different ways of getting
two apps to communicate in the world of Microsoft; ASMX was
just one of these many ways and so is now grouped under the
WCF umbrella of capabilities.
Web Services can be accessed only over HTTP & it works in
stateless environment, where WCF is flexible because its
services can be hosted in different types of applications.
Common scenarios for hosting WCF services are IIS,WAS, Self-
hosting, Managed Windows Service.
The major difference is that Web Services Use
XmlSerializer. But WCF Uses DataContractSerializer which is
better in Performance as compared to XmlSerializer.
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / 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 |
What is application variable and when it is initialized ?
Differentiate between a hyperlink control and a linkbutton control.
Guys can anobody tell what is Conditional Bloating in asp.net ??
Disable Session State at the Application Level
What is a Repeater Control and how does it works? and what is the diffrence b/w Gridview,datalist and repeater control?
From which base class all web forms are inherited?
what is CTS?
Can we have 2 web config files?
what is mean by framework?
Who can consume WebAPI?
What would be salary for 8+ years of experience in ASP.NET in different metro city in india?
Write some code using interfaces, virtual methods, and an abstract class`