locked
what url need to type to create wcf service proxy at client end RRS feed

  • Question

  • User88744855 posted

    do we need use endpoint url to create proxy. just see one config entry
    <service name="WCFService.Service" behaviorConfiguration="behaviorConfig">

    <host>
      <baseAddresses>
        <add baseAddress="net.tcp://localhost:1645/ChatServer/"/>
        <add baseAddress="http://localhost:1648/ChatServer/"/>
      </baseAddresses>
      </host>
      <endpoint address="tcp"
                      binding="netTcpBinding"
                      bindingConfiguration="tcpBinding"
                      contract="ChatService.IChat"/>

     <endpoint address="net.tcp://localhost:1645/ChatServer/mex"
                      binding="mexTcpBinding"
                      contract="IMetadataExchange"/>

     </service>

    why can't we create proxy giving the one base address like

    http://localhost:1648/ChatServer/ ?? tell me reason.

    if we add another mex endpoint in my exsisting config file like below one
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
    then can we create proxy with url like http://localhost:1648/ChatServer/
    please discuss.

    Friday, December 28, 2012 10:42 AM

Answers

  • User-1000095884 posted

    Hi,

    The MEX is a special endpoint in WCF that exposes metadata used to describe a service. As discussed in this thread, you need use mex endpoint for TCP to get metadata. It will splice "mex" address with thebaseAddress you provided, to provide a metadata address like "net.tcp://localhost:1645/ChatServer/mex".

    Best Regards.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, December 31, 2012 4:09 AM