下面有一個配置文件示例。有許多可用的結合就像WCF和多個端點有混淆
**basicHttpBinding,netTcpBinding,wsDualHttpBinding** basicHttpBinding,netTcpBinding,wsDualHttpBinding
我在WCF是新記那麼多的困惑arries,而這些都是----
因此人們如何從客戶端創建代理連接WCF服務。當然它們都使用MEX端點地址的http:// YourServer /服務/爲MyService/MEX
如果一個MEX終結點就足夠了,然後客戶端如何發出指令給他的客戶端應用程序使用連接到WCF服務NetTcpBinding的或wsDualHttpBinding。
請與我分享知識: 1)如果我使用客戶端的mex端點地址創建代理,那麼綁定我的應用將用於連接到wcf服務?
2)如何從客戶端連接到wcf服務使用netTcpBinding或wsDualHttpBinding是否有任何使用代碼的技巧?
尋找深入discussion.Thanks
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="Default">
<serviceMetadata httpGetEnabled="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service name="YourNamespace.YourService" behaviorConfiguration="Default">
<endpoint name="Default"
address="http://YourServer/Services/MyService"
binding="basicHttpBinding"
contract="YourNamespace.IYourService"/>
<endpoint name="TCP"
address="net.tcp://YourServer/ServicesTCP/MyService"
binding="netTcpBinding"
contract="YourNamespace.IYourService"/>
<endpoint name="mex"
address="http://YourServer/Services/MyService/mex"
binding="mexHttpBinding"
contract="IMetadataExchange"/>
<endpoint name="Dual"
address="http://YourServer/Services/MyService/Dual"
binding="wsDualHttpBinding"
clientBaseAddress="http://localhost:8001/client/"
contract="YourNamespace.IYourDualService"/>
</service>
</services>
</system.serviceModel>