2
.NETコアでwsHttpBindingを構成するにはどうすればいいですか?Project.jsonファイルで構成する必要がありますか? .NETのコアは、構成がWCF .NETコア - 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);
Tim、ありがとうございます。同じSystemModelアセンブリでWsHtppBindingを解決できません。 –
@AnandPatel - あなたは 'WsHttpBinding'または' WsHtppBinding'を意味しますか?私の例(2つの "t"ではなく2つの "p")ごとに 'WsHttpBinding'でなければなりません。 – Tim
申し訳ありません。はいWsHttpBinding –