我正在使用托管在windows azure服务链接http://winrttest.cloudapp.net/
上的wcf rest服务当我为服务客户端的构造函数创建对象时,我在windows store app中的reference.cs文件中看到了两个参数,但实际上在服务app中,服务类的构造函数没有参数化。
Reference.cs:
public Service1Client(System.ServiceModel.Channels.Binding binding,System.ServiceModel.EndpointAddress remoteAddress): base(绑定,remoteAddress) { }
我试图传递这两个参数,但无法通过webhttpbinding传递绑定。 如何为serviceclient类创建实例。
答案 0 :(得分:0)
这种行为很正常。 您不能通过添加服务引用等来使用像“普通”wcf服务这样的wcf休息服务。您可以通过HttpClient使用您的休息服务。