I’ve been using Webservices so long.
But,so far up to what I know,I haven’t found a solid point for using WCF over Webservices.
Webservices hosted with Cassini webserver = WCF?? Is that all?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
WCF is a communication stack that allows services to be exposed over HTTP (like ASMX) and TCP (like Remoting) as well as Named Pipes, MSMQ and with .NET 3.5 REST.
It allows this because it allows for decoupling the communcation parts of the service away from the business logic parts. All you need to do is decorate your service classes, methods and DTO’s with the appropriate contract attribute ([SeriviceContract], [OperationContract] and [DataContract] respectivly.)
This had the benefit of being able to write a service once, and allowing many different kinds of clients to consume the same service (i.e. Java clients can use HTTP, .NET clients can use TCP, legacy can use MSMQ, etc.) using multiple bindings and endpoints.
WCF will still allow you do use all the features of each transport, including security, transactions, reliable messaging, etc., but you need to use some care. Not all features work on all transports, and you need to design accordingly. WCF allows you to specify in your contract which features are required. This prevents somone from trying to expose your service in a way that does not support the required feature set (i.e. if your service requires transactions, the WCF runtime will not allow the service to be accessed via a basic HTTP endpoint).
WCF is also highly extensible via custom behaviors (which influence how the WCF runtime works) and custom channels (which control how WCF services communicate with the outside world.)
WCF has a bit of a learning curve compared to ASMX, but the benefits ABSOLUTLY out weight this learning curve.