WCF Contract Name 'IMyService' could not be found?

后端 未结 13 2061
借酒劲吻你
借酒劲吻你 2021-02-01 01:16

The contract name \'IMyService\' could not be found in the list of contracts implemented by the service \'MyService\'.. ---> System.InvalidOperationException: The

13条回答
  •  日久生厌
    2021-02-01 01:32

    This is a slightly more uncommon solution, that applied to my situation with the same error:

    It's possible that the contract namespace can be overridden, with the following attribute:

    [System.ServiceModel.ServiceContractAttribute([...], ConfigurationName = "IServiceSoap")]
    public interface ISomeOtherServiceName
    

    Which would require:

    
    

    Rather than the usual (namespace).ISomeOtherServiceName.

    This can be a result of code generation, in my case WSCFBlue

提交回复
热议问题