0

我有一个带有两个端点的服务。一个端点用于 wsdual 绑定,另一个用于 tcp 绑定。当我使用 wcfsvchost.exe 启动我的 wcf 服务时

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"

然后我的服务开始了,但它只显示一个 mex 端点。它应该显示两个 mex 端点,因为我在 web.config 文件中声明了两个端点。这是我的配置文件条目。

<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>

配置文件中有什么我想念的吗?请指导我需要做什么,因此 wcfsvchost 将为我的服务显示两个不同的端点。谢谢

4

0 回答 0