What to choose? ASMX web service or WCF in .net 3.5?

前端 未结 6 1181
情深已故
情深已故 2021-02-13 23:49

The current project i am working on is extensively using web services and is made in .net 3.5. Now as we are going for implementation of second phase we are confused if we shoul

6条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-14 00:35

    ASMX is great and simple - but it's very limited in many ways:

    • you can only host your web services in IIS
    • you can only reach your web services over HTTP
    • security is very limited

    WCF remedies this - and offer much more beyond that. You can host your WCF services in IIS - or self-host in a console app or Win NT Service, as need be. You can connect your WCF services using HTTP, TCP/IP, MSMQ, Peer-to-peer protocols, named pipes for on-machine communications and much more.

    I'd definitely recommend you go with WCF. It's a tad more complex than ASMX, but it also offer just sooo much more capabilities and choices!

    As for resoures: there's the MSDN WCF Developer Center which has everything from beginner's tutorials to articles and sample code.

    Also, I would recommend you have a look at the Pluralsight screen casts on WCF - it's an excellent series going from "Creating your first WCF service" and "Creating your first WCF client" all the way to rather advanced topics. Aaron Skonnard very nicely explains everything in 10-15 minutes screencasts - highly recommended!

提交回复
热议问题