Как настроить wsHttpBinding с ядром .NET, Должен ли я настраиваться в файле Project.json? Перед .NET Ядра конфигурация, как показано нижеWCF .NET Core - Конфигурация WsHttpBinding 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>
Я нашел статью, которая работает похоже, что я ищу, но его BasicHttpBinding, мне нужно 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);
Тим, спасибо за ваш ответ. Я не могу разрешить WsHtppBinding с той же сборкой SystemModel –
@AnandPatel - Вы имеете в виду 'WsHttpBinding' или' WsHtppBinding'? Это должно быть «WsHttpBinding» в моем примере (два «t», а не два «p»). – Tim
Извините за тип. yes WsHttpBinding –