0
所以这里是我的客户端App.config
,但我需要用C#代码来做到这一点,所以任何人都可以帮助我吗?我尝试了一些方法来做到这一点,但我仍然无法找到如何。在App.Config中的C#端点
<!--<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IInfo" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://appserver.gwp.ge/CustomerService/Info.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IInfo"
contract="BillingService.IInfo" name="BasicHttpBinding_IInfo" />
</client>
</system.serviceModel>
</configuration>-->
https://msdn.microsoft.com/en-us/library/ms731862(v=vs.110).aspx 或 http://stackoverflow.com/questions/2943148/how-to-programmatically-connect-a -client-to-a-wcf-service –
我认为这可能有所帮助: [http://stackoverflow.com/questions/11583882/programatically-adding-an-endpoint](http://stackoverflow.com/questions/11583882/programatically-adding-an-endpoint) –