Skip to Content
Introducing .NET 4.0: with Visual Studio 2010
book

Introducing .NET 4.0: with Visual Studio 2010

by Alex Mackey
February 2010
Beginner content levelBeginner
400 pages
11h 13m
English
Apress
Content preview from Introducing .NET 4.0: with Visual Studio 2010

7.1. Configless WCF

One of the most frustrating aspects of WCF for me was the massive amount of configuration needed—it always seemed to be much harder to configure than it should be, especially when compared with the simplicity of creating an ASMX services. With great flexibility and power comes a great big XML configuration file.

WCF4 allows you to create a service with no configuration file at all in just a few lines of code. Let's do this now:

  1. Create a new WCF Service Library project called Chapter7.ConfiglessService.

  2. Add a console application to the solution called Chapter7.ConfiglessHost.

  3. In Chapter7.ConfiglessHost, add a reference to Chapter7.ConfiglessService and the System.ServiceModel assembly.

  4. In Chapter7.ConfiglessHost Program.cs, add ...

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

ASP.NET 3.5 For Dummies®

ASP.NET 3.5 For Dummies®

Ken Cox
ASP.NET 4 Unleashed

ASP.NET 4 Unleashed

Stephen Walther, Kevin Hoffman, Nate Dudek

Publisher Resources

ISBN: 9781430224556Purchase book