jjzjj

selfServiceHost

全部标签

c# - 在一个 WCF 服务中托管多个契约(Contract)

这个问题在这里已经有了答案:RunWCFServiceHostwithmultiplecontracts(8个答案)关闭9年前。是否可以在一个WCF服务中托管多个服务契约(Contract)?如果是这样,如何?我一直在谷歌上搜索,有些帖子说你可以做到(但不是怎么做),而其他人则说这是不可能的。当我运行服务器时,出现以下错误:Thecontractname'ConsoleAppWcfCommon.IBarService'couldnotbefoundinthelistofcontractsimplementedbytheservice'ConsoleAppWcfServer.FooSer