Skip to Main Content
Programming ASP.NET 3.5, 4th Edition
book

Programming ASP.NET 3.5, 4th Edition

by Dan Maharry, Dan Hurwitz, Jesse Liberty
October 2008
Intermediate to advanced content levelIntermediate to advanced
1166 pages
28h 31m
English
O'Reilly Media, Inc.
Content preview from Programming ASP.NET 3.5, 4th Edition

Developing a WCF Web Service

In contrast to ASP.NET web services which were introduced in .NET v1.0 and built into VS2002 at launch, the Windows Communication Foundation (WCF) was introduced in .NET 3.0, a release not tied to any particular release of Visual Studio. Coming after the launch of VS2005, VS2008 is the first release of Visual Studio with built-in support for WCF: project templates and wizards to match those we just demonstrated for ASP.NET web services. Of course, the files generated and the wizards used aren’t exactly the same, as the goals of WCF are different from those of ASP.NET services. Unlike building web services in ASP.NET, web services built with WCF can be used in non-web contexts. You can share most of the code you write to implement the same service deployed as a .NET Remoting service, or as a local object, and even if you keep it as a web service, you can choose among several web service standards, not just SOAP.

Creating a WCF Service

WCF is designed around the concept of contracts, which are .NET classes and interfaces that describe your service to would-be users. WCF uses interfaces to define a service because they are completely decoupled from any implementation details. In C#, an interface has just the declarations for methods but no implementations, and any class that implements the interface must provide a definition for each method. Since any client to the service will know only about the interface, this ensures that clients do not tie any of their ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Programming Microsoft® ASP.NET 3.5

Programming Microsoft® ASP.NET 3.5

Dino Esposito
Learning ASP.NET 3.5, 2nd Edition

Learning ASP.NET 3.5, 2nd Edition

Brian MacDonald, Dan Hurwitz, Jesse Liberty
Pro ASP.Net 4 in C# 2010

Pro ASP.Net 4 in C# 2010

Matthew MacDonald, Adam Freeman, Mario Szpuszta
Programming .NET 3.5

Programming .NET 3.5

Jesse Liberty, Alex Horovitz

Publisher Resources

ISBN: 9780596156657Supplemental ContentErrata Page