Wie konfiguriere ich wsHttpBinding mit .NET Core, sollte ich in Project.json Datei konfigurieren? Vor .NET Core ist die Konfiguration wie unterWCF .NET Core - WsHttpBinding Konfiguration project.json
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="IService_Endpoint">
<security mode="None" />
</binding>
</wsHttpBinding>
</bindings>
<client>
<endpoint address="http://serviceURL/Service.svc"
binding="wsHttpBinding" bindingConfiguration="IService_Endpoint"
contract="IService" name="IService_Endpoint" />
</client>
ich einen Artikel gefunden, die für Suche sieht aus wie ich arbeitet, aber sein Basichttpbinding, ich brauche wsHttpBinding.
ChannelFactory<IGetPeopleService> factory = null;
IGetPeopleService serviceProxy = null;
Binding binding = null;
binding = new BasicHttpBinding(BasicHttpSecurityMode.None);
factory = new ChannelFactory<IGetPeopleService>(binding, new EndpointAddress("http://localhost/people.svc"));
serviceProxy = factory.CreateChannel();
var result = serviceProxy.GetPeopleData(100);
Tim, Danke für Ihre Antwort. Ich bin nicht in der Lage, WsHtppBinding mit in der gleichen SystemModel Assembly zu lösen –
@AnandPatel - Meinst du 'WsHttpBinding' oder' WsHtppBinding'? Es sollte 'WsHttpBinding' für mein Beispiel sein (zwei" t ", nicht zwei" p "). – Tim
Entschuldigung für Typ. ja WsHttpBinding –