Wcf 在单个服务中提供多个接口
我想将我的服务合同与其属性分开 例如:Wcf 在单个服务中提供多个接口,wcf,web-services,Wcf,Web Services,我想将我的服务合同与其属性分开 例如: IWirelessService IWiredService 我希望在IRasadService中实现我的IWirelessService,但当我将wsdl添加到wcf测试客户端时,它会给出以下错误: 添加服务失败。服务元数据可能无法访问。确保您的服务正在运行并公开元数据。 我只想提供IRasadService作为我的主要Web服务。我该怎么做 相关代码: [ServiceContract] public interface IWirelessSer
IWirelessService
IWiredService
我希望在IRasadService
中实现我的IWirelessService
,但当我将wsdl添加到wcf测试客户端时,它会给出以下错误:
添加服务失败。服务元数据可能无法访问。确保您的服务正在运行并公开元数据。
我只想提供IRasadService
作为我的主要Web服务。我该怎么做
相关代码:
[ServiceContract]
public interface IWirelessService
{
[OperationContract]
void AddUser();
}
public class WirelessService : IWirelessService
{
UserProvider userProvider;
#region User Operations
public void AddUser()
{
throw new NotImplementedException();
}
}
[ServiceContract]
public interface IRasadService :IWirelessService
{
[OperationContract]
BoxRasadWCFReturn GetDataUsingDataContract(CompositeType composite);
// TODO: Add your service operations here
}
我尝试在我的wcf中使用多个接口,因为在一个接口中写入所有内容看起来很复杂。我的意思是多接口单WebServiceId您在尝试这样做时遇到了问题?我尝试以这种方式作为解决方案,但它给了我错误。我在IWirelessService中实现了所有接口,但它不工作。İ有可能做多个端点,只做一个服务(这是当我试着表现好时发生的事情)。如果你想让我们帮助你,你必须告诉我们你做了什么,你犯了什么错误。我们猜不出你犯了什么错误,所以我们猜不出如何防止错误发生。我编辑了我的问题,请你现在帮我。