Should I use a WCF or an ASMX webservice?

1.2k views Asked by At

I was looking for an asp.net webservice that uses .net 4.0 but everytime I choose 4.0 the webservice choice goes away.

Someone suggested to me that maybe they(MS) want you to use WCF instead. I don't know much about it but he said they are like webservices but better. So anyone got a comparisons guide?

3

There are 3 answers

3
Achilles On BEST ANSWER

First off...FORGET what Microsoft WANTS you to use, you should use the technology that best solves your problem.

One advantage of WCF over ASMX is an improved and more robust security model. However if you can secure the service or it is public then that isn't a consideration. WCF can also be hosted within an application that runs on a remote server as opposed to ASMX which must be hosted through IIS.

4
Justin Niessner On

Windows Communication Foundation (WCF) is a Framework for building services.

A Web Service is one kind of service you can build using WCF.

Therefore, you should build your Web Service using WCF.

With .NET 4.0, Microsoft has taken the classic ASMX style Web Services away and are pushing everybody to WCF. You can build Web Services that function the same way as your ASMX Web Services in WCF, it's just a matter of defining the correct binding.

0
marc_s On