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.3. No SVC File

WCF4 gives you control over the endpoint exposed for web-based services, allowing you to hide the internal representation of your services, do away with the pesky .svc extension in the service address, and create REST-friendly URLs (note that WCF probably isn't the best framework for REST services—you would probably be better off using ASP.NET MVC).

To see this great new feature, create a new WCF service application (under the web templates section) called Chapter7.Fileless, open web.config, and add the following section inside the system.serviceModel section:

<serviceHostingEnvironment> <serviceActivations> <add relativeAddress="ICouldBeAnything.svc" service="Chapter7.Fileless.Service1"/> </serviceActivations> </serviceHostingEnvironment> ...
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