Benefits to switching from classic asmx to wcf

前端 未结 2 1334
猫巷女王i
猫巷女王i 2021-02-09 22:48

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 m

2条回答
  •  深忆病人
    2021-02-09 23:41

    • 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

    to name just a few.....

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

    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.

    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!

    Marc

提交回复
热议问题