Search code examples
wcfwcf-configurationwcf-endpoint

How to specify implemented Service Contract dll in WCF config


My service implementation is present in Calc.dll.

WCF Service is present in Svc.dll

I have added contract inside endpoint tag in the WCF app.config file of Svc.dll.

<service behaviorConfiguration="Default" name="MySvc">
   <endpoint contract="Company.ICalc" .... />

How does WCF know that the service is implemented in Calc.dll? We have just specified the contract name.


Solution

  • In order for this to work, your svc.dll project must somehow reference calc.dll - and thus, the .NET / WCF runtime can find the specified namespace and class.