What is the difference between Webservice and WCF

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Define viewstate in .net?

533


Can you explain one critical mapping? Performance issue which one is better? Whether connected lookup tranformation or unconnected one?

800


What is actually returned from server to the browser when a browser requests an .aspx file and the file is displayed?

515


Explain the use of errorprovider control in .net?

502


How does viewstate work?

563






Describe session handling in a webfarm?

550


Why is xap important?

590


What is asp.net web pages?

517


What is the asp.net control toolkit?

550


What are the advantages of the code-behind feature?

527


What is different authentication mechanisms used in ASP.NET?

574


How can you handle unmanaged code exceptions in asp.net?

543


What are the different session state management options available in asp.net?

508


What is asp.net used for?

588


What methods are fired during the page load? Init()

511