WCF services in IIS use a .svc file to bootstrap the process of activating a service. It’s possible but not recommended to put the entire service source code and definition in a .svc file to be dynamically compiled and run. Instead, the information that’s typically conveyed is:
Based on the provided information, the service host factory is created, the service definition is loaded, and the service starts listening on the base address.
In .Net 4 it’s possible to define services through application or machine configuration as an alternative to creating a .svc file. The configuration includes the same information the .svc file would.
Service activation configuration is a new configuration element within the ServiceHostingEnvironment configuration section. The service activation configuration is a collection of service definitions that specify for each service:
The relative address functions exactly as if a file exists at the specified location. Based on the path of the relative address, requests will be passed to the service. Based on the extension of the relative address, a build provider will be invoked to construct the service. The only difference from before is that you don’t have to actually create or deploy the separate service files. Service files are virtualized from the information provided in the configuration.