This topic has not yet been rated - Rate this topic

<baseAddresses>

Represents a collection of baseAddress elements, which are base addresses for a service host in a self-hosted environment. If a base address is present, endpoints can be configured with addresses relative to the base address.

<system.serviceModel>
  <client>
    <endpoint>
      <host>
        <baseAddresses>

<baseAddresses>
   <add baseAddress="string" />
</baseAddresses>

Type

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

Attributes

None.

Child Elements

Element Description

<add> of <baseAddress>

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

Parent Elements

Element Description

<host>

A configuration element that specifies settings for a service host.


© 2007 Microsoft Corporation. All rights reserved.
Last Published: 2010-01-05
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
http://?localhost?/MyWCFWebService

There appears to be a minor oversight in baseAddress, it doesn't feel like a bug, just not the ideal behavior.

Say you create a service and publish it to you production box and navigate as such:

http://myserver/MyWcfWebService/serviceYou will get a page with this:
svcutil.exe http://localhost/MyWcfWebService/service?wsdl

Which is 100% accurate and dead wrong. I wanted this:

svcutil.exe http://myserver/MyWcfWebService/service?wsdl
What you put in <baseAddress> is too literal. You want to deploy a service to a web farm, you want to use "localhost" to mean "this server". There needs to be a setting in baseAddress that tells WCF to substitute the real server name for localhost.