none
Two endpoints for a same methods RRS feed

  • Question

  • Hi,

    I am trying to do a service which is a shared by  a two clients.

    For this i followed:

    <service name="WCf_Metadata_BasicHttpBinding.Service1" behaviorConfiguration="ConfigTest" >
            <endpoint name="ep1"
                     address="/ep1"
                     binding="basicHttpBinding"
               contract="WCf_Metadata_BasicHttpBinding.IService1"/>

            <endpoint  name="ep2"
                       address="/ep2"
                       binding="basicHttpBinding"
            contract="WCf_Metadata_BasicHttpBinding.IService1"/>

            <endpoint
                      contract="IMetadataExchange"
                      address="mex"
                      binding="mexHttpBinding" />

            <host>
              <baseAddresses>
                <add baseAddress="http://localhost:53355/"/>
    <add baseAddress="net.tcp://localhost:8082"/>
              </baseAddresses>
            </host>
          </service>

    I can know this code works.But my point is when you are adding service reference in client application .you will see the 

    <endpoint address="http://localhost:53355/Service1.svc/client1"
            binding="wsHttpBinding" bindingConfiguration="client1" contract="ServiceReference1.IService1"
            name="client1">

    <endpoint address="http://localhost:53355/Service1.svc/client2"
            binding="wsHttpBinding" bindingConfiguration="client1" contract="ServiceReference1.IService1"
            name="WSHttpBinding_IService1">

    1.when i am trying to browse this http://localhost:53355/Service1.svc/client1.Not able to see the wsdl .WHy??

    2.In both the clients web.config they will see two endpoints information.Which i don t want .Just passing the endpoint name while creating preoxy they are able to access the service.HOw to avoid two endpoint information on both the client machine.

    3 And also if my service has 5 methods 3 methods information has to be in wsdl .HOw?

    Thanks


    priyanka

    Thursday, December 4, 2014 7:45 PM

Answers