如何在wcf中以编程方式提供服务参考?

时间:2011-09-16 11:31:19

标签: wcf

我有一个wcf服务,存在于不同的系统中。我想在生产服务器中添加wcf引用。但在那个服务器我没有视觉研究。所以我不能通过内置的添加服务参考,你能告诉我如何做到这一点吗?我想远程调用一个wcf服务,我没有那里的视觉工作室。我不能去添加服务参考。

1 个答案:

答案 0 :(得分:0)

<configuration>  
  <system.serviceModel>
    <services>
      <service name="RchTransfer.RCHService">
        <endpoint binding="wsHttpBinding" address="http://localhost:9000/RCHService"
                    contract="eHeritage.Lib.IRCHService">
        </endpoint>
        <endpoint address="http://localhost:9000/RCHService/mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
      </service>
    </services>    
  </system.serviceModel>
</configuration>

将IMetadataExchange端点添加到服务器配置文件

修改

否则手动配置WCF服务

WCF Services in .Net without using “Add Service Reference”