<baseAddress>

Represents a configuration element that specifies the base addresses used by the service host.

<system.serviceModel>

  <client>

    <endpoint>

      <host>

        <baseAddresses>

          <baseAddress>

									
									<baseAddress baseAddress="string" />
								

Type

Attributes and Elements

The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

baseAddress

A string that specifies a base address used by the service host.

Child Elements

None.

Parent Elements

Element Description

<baseAddresses>

A collection of baseAddress elements.

Footer image

Send comments about this topic to Microsoft.
© Microsoft Corporation. All rights reserved.

Tags :


Community Content

ScottSharpe
Caution this page is not right

Read the page above and you might think that your configuration file should look like this
<configuration>
 <system.serviceModel>
  <services>
   <service name="MyNameSpace.MyServiceType">
    <host>
     <baseAddresses>
      < baseAddress baseAddress="http://localhost:8000/MyService/"/>
      < baseAddress baseAddress="net.tcp://localhost:8010/MyService/"/>
     </baseAddresses>
     </host>
    <endpoint address="Calculator" binding="basicHttpBinding" contract="MyNamespace.IServiceContract" />
   </service>
  </services>
 </system.serviceModel>
</configuration>

But no… baseAddress element doesn’t work that way it works like this:

 <host>
  <baseAddresses>
   <add baseAddress="http://localhost:8000/MyService/"/>
   <add baseAddress="net.tcp://localhost:8010/MyService/"/>
  </baseAddresses>
 </host>

What clued me in was the initial bug at the top.  The hierarchy doesn't match properly.  After some random hunting around I saw some examples where the <add element is used and gave it a shot.  Bingo!

Tags :

Page view tracker