Below there is one config file sample. There are many binding available like
**basicHttpBinding,netTcpBinding,wsDualHttpBinding** basicHttpBinding,netTcpBinding,wsDualHttpBinding
I am new in WCF so many confusion arries in mind and those are—-
So how people create proxy from the client side to connect the wcf service.Naturally they all use mex endpoint address http://YourServer/Services/MyService/mex
If one mex endpoint is enough then how client can give instruction to his client apps to connect to wcf service using netTcpBinding or wsDualHttpBinding.
Please share knowledge with me that:
1) If I create proxy using mex endpoint address from client side then which bindings my apps will use to connect to wcf service ?
2) How can I connect to wcf service from client side using netTcpBinding or wsDualHttpBinding is there any trick available using code ?
Looking for in-depth 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>
If you have service with multiple endpoints the created proxy contains separate client class for every contract type exposed on the service. If you have multiple endpoints with the same contract those endpoints are defined in client’s configuration file and each of these endpoints have a name specified. When you want to call the service with some specific binding you will just pass the name of the endpoint configuration to a proxy constructor.