From the host project, where do I change the contract name being used by a WCF Service? I’ve right clicked on the service reference in the project and selected properties, this only shows a folder name. I’ve gone into Configure Service but there isn’t anything about the contract there.
When I show all files in the project and open the service then Reference.svcmap > Reference.cs, about mid way down, I see:
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
[System.ServiceModel.ServiceContractAttribute(Namespace="http://mysite.com/services/", ConfigurationName="MyServiceReference.IMyService")]
public interface IMyService {
ConfigurationName is the contract name that appears in the app.config/web.config. But this is probably not the correct place to update it. Any suggestions?
You can specify your ConfigurationName where you have your service defined. Just as it is in the map: