Saturday, December 07, 2013

Deploy a WCF Service in IIS without a SVC file

WCF 4.0 provides a feature called Configuration-Based Activation, with which the information normally included in the .svc file directly into the Web.config file for a WCF service hosted by IIS.

To do this, add a section to the part of the configuration file and provide values for the relativeAddress and service elements.

The relativeAddress element should be a string that looks like a filename with the .svc extension, and the service element should specify the fully qualified type that implements the WCF service.

<serviceHostingEnvironment multipleSiteBindingsEnabled="true">
<add relativeAddress="NoServiceFile.svc" service="XXXXX.XXXXXServiceImpl" />