views:

14

answers:

1

Hey, I have services on my application and when I test it on localhost everuthing was ok. But when I publish it I have problem with base Address property. What should I put there ?

My web.config part:

<services>
  <service name="WcfService1.Service1" behaviorConfiguration="metadataBehavior">
    <endpoint address="" binding="basicHttpBinding" bindingConfiguration="WcfService1BasicHttpBindingConfig"
      contract="WcfService1.IService1" />
    <host>
      <baseAddresses>
        <add baseAddress="http://localhost:8731/WcfService1/MyService" />
      </baseAddresses>
    </host>
  </service>
  <service name="WcfService1.CrossDomainService">
    <endpoint address="" behaviorConfiguration="CrossDomainServiceBehavior"
      binding="webHttpBinding" contract="WcfService1.ICrossDomainService" />
    <host>
      <baseAddresses>
        <add baseAddress="http://localhost:8731/" />
      </baseAddresses>
    </host>
  </service>
</services>
+1  A: 

The address of the host currently exposing your services, for example:

<baseAddresses>
    <add baseAddress="http://www.myaddress.com/" />
</baseAddresses>

or maybe:

<baseAddresses>
    <add baseAddress="http://dev.myaddress.com/" />
</baseAddresses>

Whatever it is.

Maxime