WCF v.s. legacy ASP.Net Web Services [duplicate]

不问归期 提交于 2019-12-09 00:34:28

问题


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:


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




回答2:


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:


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.




回答4:


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




回答5:


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



来源:https://stackoverflow.com/questions/1164938/wcf-v-s-legacy-asp-net-web-services

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!