What is the difference between WCF and ASMX Web Services?

Basic difference between ASMX or ASP.NET is web service designed to send and receive messages using SOAP over HTTP.

WCF can exchange messages using any format (SOAP is default) over any transport protocol such as HTTP, TCP/IP, MSMQ, NamedPipes etc.

What is the difference between a Web Service and a Web server?

A Web Service uses custom code to provide functions to client programs located somewhere on the Internet. A Web server listens for Internet requests, such as HTTP or SOAP requests, and responds with files. Most Web Services use a Web server to “feed” them with requests from clients and to “push” data back to client programs.

Why do Web Services use ASP.NET?

Web Services use ASP.NET because ASP.NET provides supporting infrastructure and plumbing for the service. Specifically, ASP.NET automatically generates WSDL files for any client of the Web Service, provides code that translates SOAP requests into method requests, and provides code that packages method responses in to SOAP responses for Web Service clients.

What is the Transport Protocol you use to call a Web Service?

SOAP (Simple Object Access Protocol) is the preferred protocol.

Explain the requirement of ASP.NET web services.

The ASP.NET web services are used for B2B applications like authorizing employees, supplier, signing of invoice etc. These web services are the way to expose the middle tier components through internet. With the help of these components, you can communicate across the firewalls as they use SOAP as a transport protocol which helps to transmit structured data using HTTP channel. The default port is 80 through which we can easily transfer message. The web services are platform independent.

What are the different protocols used by a .Net Web Service?

The protocols are normally used in .Net Web Service for communication purposes. A web service can bind with three different protocols such as Http-Get, Http-Post, and SOAP. These protocols are included in the WSDL file that is automatically generated in .NET application.

It is preferable to use Http-Get and Http-Post only when name/value pairs of data is avilable. But if the data is complex in nature that is XML notes, dataset etc, then we can use SOAP which helps to serialize data in simpler form.

Are Web services only written in .NET ?

No,

A web service is based on SOAP (Simple Object Access Protocol). So any technology which is able to implement SOAP should be able to create a web service. For example we can create web services in .NET or Java.