Click here to Skip to main content
15,888,527 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I can't seen to get the configuration right (I am a beginner at this). My WCF service is being self-hosted on a machine and I want to access if from a different machine. I assume it's all about how I define the endpoints, but I don't know how. I tried with my external IP address like in the code below, but I get an "there is no endpoint listening at ..." error. How can I configure my application to achieve what I need?

What I have tried:

<system.serviceModel>
<behaviors>
  <serviceBehaviors>
    <behavior name="name">
      <serviceMetadata httpGetEnabled="true" />
    </behavior>
  </serviceBehaviors>
</behaviors>
<services>
  <service name="Namespace.Name" behaviorConfiguration="name">
    <host>
      <baseAddresses>
        <add baseAddress="http://xxx.xxx.108.185:8888/MyService/"/>
      </baseAddresses>
    </host>
    <endpoint address="" binding="basicHttpBinding" contract="Namespace.IName" />
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
  </service>
</services>
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900