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> ...

Get Introducing .NET 4.0: with Visual Studio 2010 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.