5

Possible Duplicate:
Web Services — WCF vs. Standard


Could anyone recommend me some documents to describe why WCF is better than legacy ASP.NET web services? I am especially interested in performance and security.

1

5 Answers 5

8

WCF is much more flexible:

  • can be used over HTTP (like legacy ASMX)
  • but also: can be used over NetTCP, MSMQ, wsHttp and so on

  • WCF services can be hosted in IIS (like legacy ASMX)

  • but WCF services can also be self-hosted in a console app, Windows NT Service, etc.

  • WCF offers a lot more security features and security levels than ASMX (message security etc.)

  • WCF offers things like reliable messaging, transaction support etc.

In WCF, almost anything is configurable in a config file - much more so than with ASMX.

I don't have any ready-made documents at hand that describe this - but that's really the essence of it, I'd say.

Marc

PS: Not sure if this one would contain anything useful for you:

http://whitepapers.techrepublic.com/abstract.aspx?kw=remoting&docid=270830

PPS: you would think that Microsoft would have heaps of these white papers to convince folks - but no..... :-)

6
  • Thanks! Any document to recommend? I am persuading others, so need to documents not written by myself. :-)
    – George2
    Jul 22, 2009 at 12:39
  • Sorry Marc, I did not find a related downloadable document.
    – George2
    Jul 22, 2009 at 12:43
  • Marc, if we do not host WCF into IIS, benefit is?
    – George2
    Jul 22, 2009 at 12:50
  • If you self-host, you have total control over how the service host is constructed; plus you don't need IIS (and don't need to worry about IIS and its bug and patches) :-)
    – marc_s
    Jul 22, 2009 at 13:08
  • 1
    Maybe this will help? This is a performance comparison of WCF vs. other distributed technologies by Microsoft: <br/> msdn.microsoft.com/en-us/library/bb310550.aspx
    – marc_s
    Jul 23, 2009 at 9:23
4

George,

I don't have any such documents handy, because it's so obvious why WCF is better.

First, because of Microsoft: ASMX Web Services are a “Legacy Technology”. They're also publicly stating that they will not be making changes to WSDL.EXE and other parts of the ASMX technology. We have enough trouble in this Industry with legacy technology and applications - it makes no sense to create a new piece of legacy code today.

Second, WCF abstracts the concepts that are part of ASMX, Remoting, and WSE. "Anything they can do, WCF can do better".

3
  • John, if we do not host WCF into IIS, benefit is?
    – George2
    Jul 22, 2009 at 12:49
  • 1
    Then the benefit is you can host it where you want to host it. For instance, you can host it in a Windows Service, or even in a WinForms client application. That can be used to permit two client applications to talk to each other. Also, remember IIS is HTTP-only. There's a new Windows Process Activation Service that can activate a WCF service over any protocol (binary over raw TCP/IP for instance). Jul 22, 2009 at 12:52
  • 1
    The benefit is long running services e.g. one that caches large amount of stable data at startup and keeps holding it for lifetime. And if you are not using Windows server 2008 hosting your own service is the only way to use Net.Tcp transport (the most performant one). Moreover Depending on your IT setup it can be much easier to deploy a windows service rather than install, configure and deploy to IIS.
    – softveda
    Jul 22, 2009 at 12:56
3

To put it simply, you're question is the equivalent of "Why is .NET better than VB6". Given enough time, any legacy technology will become a maintenance / financial burdon.

As you've asked about security and performance in particular, I would say "it depends". It is possible to make either option secure and performance is largely down to the code you write. One plus side for WCF performance is that you don't have to host it within IIS - so you have more options and flexibility to make it performant.

2
  • Hosing without IIS has the benefit of??
    – George2
    Jul 22, 2009 at 12:49
  • 1
    I find it to be almost noticably faster to host it as a service using TCP.
    – Fenton
    Jul 23, 2009 at 7:45
1

WCF is a higly configurable stack with almost infinite combinations of serialization, security, transport etc. For your specific question WCF implements WS-* protocols including both transport and message security. WCF datacontract serializer is substantially faster than xmlserialzer used in acmx. The Net.Tcp transport is also more performant than http based transport.

I found a performance comparison here http://msdn.microsoft.com/en-us/library/bb310550.aspx

0
1

Very good overview on Microsoft MSDN: "Comparing ASP.NET Web Services to WCF Based on Development" http://msdn.microsoft.com/en-us/library/aa738737.aspx

Not the answer you're looking for? Browse other questions tagged or ask your own question.