How to configure multiple bindings in WCF
Suppose our client have multiple applications like windows and web application.
Now we want to expose same service to the multiple applications, so we need to
configure multiple binding in web.config file. BasicHttpBinding for web
application and netTcpBinding for windows application. Remember we can not use
netTcpBinding for web application. Here we use the mexHttpBinding binding for
both applications. mexHttpBinding binding is used to expose the metadata to
client side. If we did not put it in web.config file it show an error (Only VS
2010 and below).
<services>
<service behaviorConfiguration="ServiceBehavior" name="Service">
<endpoint address="Web1"
binding ="basicHttpBinding"
contract ="IService">
<identity>
<dns value= "amit-pc"/>
</identity>
</endpoint>
<endpoint address="Web"
binding ="mexHttpBinding"
contract ="IMetadataExchange">
</endpoint>
<endpoint address=""
binding ="netTcpBinding"
contract ="IService" bindingConfiguration="InsecureTcp">
</endpoint>
<endpoint address="Windows"
binding ="mexTcpBinding"
contract ="IMetadataExchange">
</endpoint>
</service>
</services>

Amit TiwariPosted Jul 15, 2013, 9:18 AM
No you can not dothis with single interface, you need to create one service interface for each set of methods you want to expose. You can define a interface for first 2 methods and expose that service to all those clients who can access those 2 methods. Rest you can define in second service interface with another 1 methods, and have a second service implementation class that implements the first and the second interface for the total of 3 methods.
Pramod ThakurPosted Jul 15, 2013, 2:36 AM
Hi, I have a question.. Suppose i made a wcf service which have one ServiceContract and ServiceContract have 4 OperationContract and my service going to use 10 clients but all OperationContract is not accessible to all client i.e. client1 can access only 2 operationcontract client2 can access only one operationcontract.. So how can i implement this scenario.. Plz help tnx in adv :)