views:

1424

answers:

5

Duplicate: although this is a good discussion, this is a duplicate of Web Services — WCF vs. Standard. Please consider adding any new information to the earlier question and closing this one.


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. Thanks!

+5  A: 

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.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..... :-)

marc_s
Thanks! Any document to recommend? I am persuading others, so need to documents not written by myself. :-)
George2
Sorry Marc, I did not find a related downloadable document.
George2
Marc, if we do not host WCF into IIS, benefit is?
George2
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
Maybe this will help? This is a performance comparison of WCF vs. other distributed technologies by Microsoft: <br/>http://msdn.microsoft.com/en-us/library/bb310550.aspx
marc_s
+1  A: 

See this question.

David Basarab
It is a very good discussion. :-)
George2
David, if we do not host WCF into IIS, benefit is?
George2
I would put that in the discussion of the other question.
David Basarab
+2  A: 

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".

John Saunders
Cool, John! :-)
George2
John, if we do not host WCF into IIS, benefit is?
George2
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).
John Saunders
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.
Pratik
+2  A: 

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.

Sohnee
Hosing without IIS has the benefit of??
George2
I find it to be almost noticably faster to host it as a service using TCP.
Sohnee
+1  A: 

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

Pratik
Nice stuff, thanks!
George2