Thank you guys for your answers. I now have a solution that works for me without putting the interface in a separate assembly and in the GAC. I do not look at using an interface for other projects, just using the same interface for several services in one project.
What I was trying to do was to make changes between RealService and TestService in the WCF service configuration file so that the client does not know the difference (the client would not have to change its configuration to point to another. Svc file). I'm not sure if this is possible, or the least, if so, it is definitely not straightforward.
What I'm doing now is just to specify both services in the WCF service configuration file, and then I tell the client one option or another based on which I want. Since this WCF service is for internal use only, and we control both the client and the service, this is not a bad compromise. In any case, this decision is probably more explicit in its intentions.
Here is a snippet of the configuration file:
<services> <service behaviorConfiguration="WcfService1.Service1Behavior" name="WcfService1.TestService"> <endpoint address="" binding="basicHttpBinding" bindingConfiguration="testBasicHttpBinding" contract="WcfService1.IUselessService"> </endpoint> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> </service> <service behaviorConfiguration="WcfService1.Service1Behavior" name="WcfService1.RealService"> <endpoint address="" binding="basicHttpBinding" bindingConfiguration="testBasicHttpBinding" contract="WcfService1.IUselessService"> </endpoint> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> </service> </services>
source share