none
WCF proxy creation at client side with multiple endpoint RRS feed

  • Question

  • i have one service with two endpoint. one endpoint is for wsdual binding and another for tcp binding. when i start my wcf service with wcfsvchost.exe like

    WcfSvcHost.exe /service:"C:
    \Users\TRIDIP\Documents\Visual Studio 2010\Projects\BBAChatService\BBAChatService\bin
    \BBAChatService.dll" /config:"C:\Users\TRIDIP\documents\visual studio 2010\Projects
    \BBAChatService\BBAChatService\Web.config"

    then my service was started.

    the problem is when i try to create proxy at client side after starting service with WcfSvcHost.exe then all endpoints related info gets added in client's config file but i want that when i will create proxy with tcp mex endpoint or mexHttpBinding from client side then only valid endpoint should be added in client's config file not all endpoints. so guide me what to change in my config file at service end. here is my config file at service end....please have look.

    <service name="BBAChatService.ChatService" behaviorConfiguration="BBAChatService.ChatServiceBehavior" >
            <host>
              <baseAddresses>
                <add baseAddress ="http://localhost:8732/ChatService.svc/"/>
                <add baseAddress ="net.tcp://localhost:7998/ChatService/"/>
              </baseAddresses>
            </host>
    
            <endpoint name="dual_bind"
                      address="dual"
                      binding="wsDualHttpBinding" 
                      bindingConfiguration="WSDualHttpBinding_IChatService" 
                      contract="BBAChatService.IChatService">
            </endpoint>
            <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
    
            <endpoint name="tcp_bind"
                  address="tcp"
                  binding="netTcpBinding"
                  bindingConfiguration="tcpBinding"
                  contract="BBAChatService.IChatService">
            </endpoint>
    
            <endpoint address="net.tcp://localhost:7996/ChatService/mex"
                              binding="mexTcpBinding"
                              contract="IMetadataExchange"/>
    
    
          </service>
    guide me what to change in my config. thanks


    Tuesday, January 15, 2013 7:50 AM

All replies

  • You can manually modify your client config to endpoint configuration on the client side.

    With Thanks and Regards
    Sambath Raj.C
    click "Proposed As Answer by" if this post solves your problem or "Vote As Helpful" if a post has been useful to you
    Happy Programming!

    Tuesday, January 15, 2013 10:18 AM
  • suppose i do not know who will be my client then how can i modify client config file. i want to restrict that when client will create proxy with tcp mex endpoint then only tcp related endpoint will be created in client's config not other will be expose....is there any way.
    Tuesday, January 15, 2013 12:23 PM