Explain about ASMX in ASP.NET? explain in detail

Posted by Maheshvishnu under ASP.NET on 8/30/2012 | Points: 10 | Views : 1230 | Status : [Member] | Replies : 3
Explain about ASMX in web service?

mention the differences between ASMX and WCF?

mahesh


Responses

Posted by: Ranjeet_8 on: 8/30/2012 [Member] [MVP] Gold | Points: 25

Up
0
Down
What is web service (ASMX)? - Web service is a program running on the web server that can be called by making HTTP request. ASP.NET Web Service is a program written in ASP.NET running on the web server that can be called by making HTTP request.

Web Service is used to expose your logic or services to your clients or other users so that they can consume your services to store or retrieve data from your application. Many air ticketing systems are built over web services as it needs a lot of interaction between different systems there are many other examples.

Read more on Web Services http://en.wikipedia.org/wiki/Web_service . To know how to create Web Services, read this http://msdn.microsoft.com/en-us/library/t745kdsh.aspx

Diff. between ASMX and WCF :
Web services can only be invoked by HTTP (traditional webservice with .asmx). While WCF Service or a WCF component can be invoked by any protocol (like http, tcp etc.) and any transport type.

Second web services are not flexible. However, WCF Services are flexible. If you make a new version of the service then you need to just expose a new end. Therefore, services are agile and which is a very practical approach looking at the current business trends.

We develop WCF as contracts, interface, operations, and data contracts. As the developer we are more focused on the business logic services and need not worry about channel stack. WCF is a unified programming API for any kind of services so we create the service and use configuration information to set up the communication mechanism like HTTP/TCP/MSMQ etc

For more details, read http://msdn.microsoft.com/en-us/library/aa738737.aspx




Maheshvishnu, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Muhsinathk on: 9/18/2012 [Member] Bronze | Points: 25

Up
0
Down
ASMX

1ASMX uses the XmlSerializer to translate classes into XML for communication, and to translate the XML back into classes on the receiver's end.
2.Only available in IIS
3.Only callable from HTTP
4.Easy and simple to write and configure
5.ASMX services use the HTTP transport protocol for communications with Internet Information Services (IIS) as the host.
6.Authentication and authorization with ASMX is done using IIS and ASP.NET security configurations and transport layer security.

WCF

1.WCF uses a DataContractSerializer to perform the same translation
2.used with HTTP (REST and SOAP), TCP/IP, MSMQ and many more protocols.
3. hosted in IIS, a Windows Service, a Winforms application, a console app - you have total freedom.
4.WCF can use the same security components as ASMX, such as transport layer security and WSE
5.WCF services can also use the HTTP protocol, but unlike ASMX services, you also have the option to use other transport protocols. The following protocols are supported by WCF:

a) Hypertext Transfer Protocol (HTTP)
b)Transmission Control Protocol (TCP)
c)Message Queuing (also known as MSMQ)
d)Named pipes

Maheshvishnu, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Muhsinathk on: 9/18/2012 [Member] Bronze | Points: 25

Up
0
Down
Please mark as answer if it helpful to you...That helps others who search the same...

Maheshvishnu, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response