Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Web Services -- WCF vs. ASMX ("Standard")

I am working on a new project. Is there any benefit with going with a WCF web service over a regular old fashion web service?

Visual Studio offers templates for both. What are the differences? Pros and cons?

like image 957
jdiaz Avatar asked Aug 09 '08 06:08

jdiaz


People also ask

What is the difference between WCF and ASMX Web services?

5) The purpose of ASMX services is to send and receive data using SOAP over HTTP protocol. However, WCF services can send and receive data using any format over different protocols like HTTP, HTTPS, TCP, MSMQ etc.

Is Asmx a WCF service?

WCF completely replaces ASMX web services. ASMX is the old way to do web services and WCF is the current way to do web services. All new SOAP web service development, on the client or the server, should be done using WCF.

Is Asmx web service obsolete?

If you can work with WCF then yes the ASMX services are obsolete because the WCF can fully replace them with more performance and flexibility (multiple binding), functionality.

What is the difference between Asmx and SVC?

When web developers talk about . asmx, they know that it is something not too complicated – it can be configured easily. The downside is, it is only callable from HTTP, while . svc is used with HTTP, MSMQ, and can be hosted through different platforms such as the Winforms application.

What is the difference between ASP NET Web Services and WCF?

Comparing ASP.NET Web Services to WCF Based on Purpose and Standards Used. ASP.NET Web services was developed for building applications that send and receive messages by using the Simple Object Access Protocol (SOAP) over HTTP.

What is the difference between ASMX and WCF?

WCF is basically "ASMX on stereoids" - it can be all that ASMX could - plus a lot more!. In short: WCF is here to replace ASMX fully. Check out the WCF Developer Center on MSDN.

What is the difference between SVC and WCF?

Its extension is “.svc”. Its extension is “.asmx”. It is more reliable, fast, and robust as compared to web services, and therefore it considered good for developing real-time applications. It is not reliable and slow as compared to WCF.

Why WCF is used for SOA?

It is commonly utilized for Service Oriented Architecture (SOA), which is renowned for building reliable, secure, and transaction-oriented service. WCF is built to develop SOAP-based services and bindings, and thus it utilizes standard XML schema over HTTP.


2 Answers

What is a "regular old fashioned web service?" An ASMX service, or are you using WSE as well? ASMX services are not naturally interoperable, don't support WS-* specs, and ASMX is a technology that is aging very quickly. WSE (Web Service Enhancements) services DO add support for WS-* and can be made to be interoperable, but WCF is meant to replace WSE, so you should take the time to learn it. I would say that unless your application is a quick an dirty one-off, you will gain immense flexibility and end up with a better design if you choose WCF. WCF does have a learning curve beyond a [WebMethod] attribute, but the learning curve is over-exaggerated in my opinion, and it is exponentially more powerful and future proof than legacy ASMX services.

Unless your time line simply cannot tolerate the learning curve, you would be doing yourself a huge favor learning WCF instead of just sticking with ASP.NET Web Services. Applications will only continue to become more and more distributed and interconnected, and WCF is the future of distributed computing on the Microsoft platform.

Here is a comparison between the two.

like image 96
Nathan Avatar answered Sep 20 '22 05:09

Nathan


The Pros of doing all by yourself is:

  • No learning curve
  • Very flexible

The Pros of WCF are:

  • Costs less time in the longer run
  • Switch protocols without programming

A disadvantage of WCF: some static property names can be pretty lengthy...

To summarize: WCF lets you focus on programming, but you need to learn it first ;-)

like image 33
doekman Avatar answered Sep 21 '22 05:09

doekman