<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.
Type
The following sections describe attributes, child elements, and parent elements.
Attributes
None.
Child Elements
| Element | Description |
|---|---|
|
A configuration element that specifies the base addresses used by the service host. |
Parent Elements
| Element | Description |
|---|---|
|
A configuration element that specifies settings for a service host. |
© 2007 Microsoft Corporation. All rights reserved.
Last Published: 2010-01-05
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:
svcutil.exe http://localhost/MyWcfWebService/service?wsdl
Which is 100% accurate and dead wrong. I wanted this:
svcutil.exe http://myserver/MyWcfWebService/service?wsdlWhat 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.