从经典的asmx转换为wcf的好处 [英] Benefits to switching from classic asmx to wcf

查看:90
本文介绍了从经典的asmx转换为wcf的好处的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近,我已经从使用asmx Web服务切换到使用wcf服务,转换已接近完成,但是我知道我将进行大量错误检查和测试,以确保一切都按预期进行.

Recently I made the switch from using asmx web services to using wcf services, the transition is nearly finished, but I know I'm in for a lot of error checking and testing to make sure everything ported as expected.

我的问题是-到目前为止,我只能想到使用wcf有一个好处,那就是您可以轻松实现单例Web服务.

My question is - so far I can only think of 1 good benefit to using wcf, and that is you get an easy way to implement a singleton web service.

除了不得不告诉您的以外,配置WCF应用程序似乎过于复杂,而且我将永远怀念测试asmx Web服务有多么容易.

Besides that I have to tell you, configuring a WCF Application seems way overly complicated, and I'll forever miss how easy it was to test asmx web services.

在ASMX Web服务上使用WCF还有什么其他好处?

What other benefits are there to using WCF over ASMX web services?

推荐答案

  • 更多协议选项; ASMX是IIS和HTTP,仅 -WCF为您提供HTTP,NetTcp,MSMQ,IPC-您将其命名为
  • 您可以编写一次服务,并将其公开给多个端点
  • 自我托管:您可以在控制台应用程序,Winforms应用程序,WPF应用程序中托管WCF服务,也可以让它由IIS/WAS处理-但您不必这样做
  • 更多选项,例如可靠的会话,更多的安全选项
  • 在WCF中,您不必像在ASMX中那样处理过多的管道黏性"-您可以专注于业务问题,并让配置和属性处理所有您不想处理的黏性材料处理
    • more protocol options; ASMX is IIS and HTTP only - WCF gives you HTTP, NetTcp, MSMQ, IPC - you name it
    • you can write your service once, and expose it on multiple endpoints
    • self-hosting: you can host your WCF service in a console app, a Winforms app, a WPF app, or let it be handled by IIS/WAS - but you don't have to
    • a lot more options like reliable sessions, lot more security options
    • you don't have to deal with as much "plumbing goo" in WCF as you do in ASMX - you can concentrate on your business problem, and let the config and attributes handle all the gooey stuff you don't want to deal with
    • 仅举几例.....

      在Google或Bing中搜索"WCF vs ASMX",我相信您会发现更多文章,博客文章和比较信息.

      Search Google or Bing for "WCF vs ASMX" and I'm sure you'll find plenty more article, blog posts and comparisons.

      ASMX已经过去了-WCF是现在和将来.它可以做更多的事情-因此需要学习更多的东西.

      ASMX has passed its time - WCF is the present and the future. It can do a lot more - therefore it's a bit more to learn.

      但是,如果您查看正确的来源,例如这两个Dotnet Rocks电视节目( Keith Elder揭密WCF 极端WCF上的米格尔·卡斯特罗),我敢肯定,您将很快开始WCF,希望不会痛苦!

      But if you check out the right sources, like these two Dotnet Rocks TV shows (Keith Elder Demystifies WCF and Miguel Castro on Extreme WCF), I'm sure you'll get a quick and hopefully painless start into WCF!

      马克

      这篇关于从经典的asmx转换为wcf的好处的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆