Aspdotnet-Suresh

aspdotnet-suresh offers C#.net articles and tutorials,csharp dot net,asp.net articles and tutorials,VB.NET Articles,Gridview articles,code examples of asp.net 2.0 /3.5,AJAX,SQL Server Articles,examples of .net technologies

C# - Difference between Webservice and WCF in Asp.net

Oct 25, 2012
Introduction:

In this article I will explain difference between webservice and wcf in asp.net.

Description:

In previous post I explained Difference between convert.string and .tostring(), difference between web application and website and many articles relating to Interview Questions in asp.net, SQL Server. Now I will explain difference between webservice and wcf in asp.net.

What is Web Service?

Web Service is an application that is designed to interact directly with other applications over the internet. In simple sense, Web Services are means for interacting with objects over the Internet. The Web serivce consumers are able to invoke method calls on remote objects by using SOAP and HTTP over the Web. WebService is language independent and Web Services communicate by using standard web protocols and data formats, such as HTTP, XML and SOAP. (Read More)

What is WCF (windows communication foundation) Service?

Windows Communication Foundation (Code named Indigo) is a programming platform and runtime system for building, configuring and deploying network-distributed services. It is the latest service oriented technology; Interoperability is the fundamental characteristics of WCF. It is unified programming model provided in .Net Framework 3.0. WCF is a combined feature of Web Service, Remoting, MSMQ and COM+. WCF provides a common platform for all .NET communication. (Read More)

Difference between WCF and Web service

Web service is a part of WCF. WCF offers much more flexibility and portability to develop a service when comparing to web service. Still we are having more advantages over Web service; following table provides detailed difference between them.

Features
Web Service
WCF
Hosting
It can be hosted in IIS
It can be hosted in IIS, windows activation service, Self-hosting, Windows service
Programming
[WebService] attribute has to be added to the class
[ServiceContract] attribute has to be added to the class
Model
[WebMethod] attribute represents the method exposed to client
[OperationContract] attribute represents the method exposed to client
Operation
One-way, Request- Response are the different operations supported in web service
One-Way, Request-Response, Duplex are different type of operations supported in WCF
XML
System.Xml.serialization name space is used for serialization
System.Runtime.Serialization namespace is used for serialization
Encoding
XML 1.0, MTOM(Message Transmission Optimization Mechanism), DIME, Custom
XML 1.0, MTOM, Binary, Custom
Transports
Can be accessed through HTTP, TCP, Custom
Can be accessed through HTTP, TCP, Named pipes, MSMQ,P2P, Custom
Protocols
Security
Security, Reliable messaging, Transactions

If you want to know more about WCF check this article Introduction to WCF tutorial

If you want to know more about WebServices check this article Create and Consume WebService tutorial

If you enjoyed this post, please support the blog below. It's FREE!

Get the latest Asp.net, C#.net, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email.

subscribe by rss Subscribe by RSS subscribe by email Subscribe by Email

22 comments :

Anonymous said...

hi suresh.. do u hav any other blog related to php.. i need to know one php blog like yours.. plz guide me.. thank u.

SirigineediRavi said...

Hi dasari suresh, i'll really like to read ur articles...

Thank you for your Website.

SirigineediRavi said...

Hey May i know which time zone ur using to display in bottom of comments. It seems to be 11:00 Hours Minus from the IST(Indian Standard Time).

Anonymous said...

very informative articles

Anonymous said...

fdhfhghg

Abhinavsingh993 said...

As always you are great

Anonymous said...

You are really helpful to others....keep going

laxman said...

Hi Suresh More Send Me .Net Related Articles.

nilu gupta said...

i read every article thank u sir

Anonymous said...

Hello sir.I AM DEEPALI,Really its a nice article.i read every article carefully and solve demo program.Its really helpful enhance my knowledge about Asp.net.I request you sir please give me more info about JSONS AND JQUERY AND RELATED PROGRAM.THANK YOU.

Anonymous said...

Hi Suresh,

This is Chandu,Thank you very much for your great work.you are doing greate job for the sake of community,Recently while Goggling for ajax stuff
I came across your blog.Every article was awesome and very precise .Its very use full for novice and
the people who are from non technical background also under stand it very easily.
could u pleas explain atlas ajax and json

Anonymous said...

You are having the true spirit of coding.Thanks for every code

Prasad said...

nice

Anonymous said...

nice.............

Unknown said...

very nice your collection of articles

bajinder said...

dear sir please hel me .I have the requirement of authentication of my web application users with their eToken, i obtained Digital Signature Certificate (DSC) and accessing the eToken using CAPICOM, everything works fine when i run the solution from .net ide, after hosting in IIS it is not reading the device, it points the etoken port of the iis server, instead of the port in client machine. i am using Aladin client, i searched for many, yet i found few replies only under this section. also in client application not in web app. so pls share your suggestions for the above requirement.

Anonymous said...

Very Good Article

Hiren Khatri said...

Hey Suresh... Your articles are very helpful. Thanx

Anonymous said...

Web service can be accessed via HTTP only but its wrongly written that it can be accessed through HTTP, TCP, Custom

Anonymous said...

Web service can be accessed via HTTP only but its wrongly written that it can be accessed through HTTP, TCP, Custom

Unknown said...
This comment has been removed by a blog administrator.
Unknown said...

Hi,Thanks for providing your collection.

Give your Valuable Comments

Note: Only a member of this blog may post a comment.

© 2015 Aspdotnet-Suresh.com. All Rights Reserved.
The content is copyrighted to Suresh Dasari and may not be reproduced on other websites without permission from the owner.