<p>From what I've seen the  tag is ignored when hosting a WCF service in IIS.  I understand that when self-hosting this is required but is this harmful or even used when operating under IIS?</p>

<p>ex.</p>

<pre><code>&lt;system.serviceModel&gt;
  &lt;service blah blah blah&gt;
    &lt;host&gt;
      &lt;baseAddresses&gt;
        &lt;add baseAddress="http://localhost/blah" /&gt;
      &lt;/baseAddresses&gt;
    &lt;/host&gt;
   &lt;/service&gt;
&lt;/system.serviceModel&gt;
</code></pre>

<p>From what I've seen you can take a config file describing a service from one machine and use that on a completely different machine and it works fine. It looks as if IIS completely ignores this section.</p>

<p>Thanks,
kyle</p>

[{'answer_id': 56286, 'author': 'Paul Lalonde', 'author_id': 5782, 'author_profile': 'https://Stackoverflow.com/users/5782', 'pm_score': 6, 'selected': True, 'text': "<p>As you have guessed, the baseAddresses element is completely ignored when hosting in IIS. The service's base address is determined by the web site &amp; virtual directory into which your wcf service is placed.</p>\n\n<p>Even when self-hosting, baseAddresses is not required.  It is merely a convenience that avoids you having to enter a full address for each endpoint. If it is present, the endpoints can have relative addresses (relative to the base address, that is).</p>\n"}, {'answer_id': 7846836, 'author': '0cool', 'author_id': 228718, 'author_profile': 'https://Stackoverflow.com/users/228718', 'pm_score': 2, 'selected': False, 'text': '<p>base address required for selfhosting. IIS/WAS hosts ignores the base address.</p>\n'}, {'answer_id': 20620577, 'author': 'CodeCowboyOrg', 'author_id': 3099743, 'author_profile': 'https://Stackoverflow.com/users/3099743', 'pm_score': 2, 'selected': False, 'text': '<p>According to the MSDN Microsoft documentation in the below link, midway through the page in the Note section states, "Services hosted under Internet Information Services (IIS) or Windows Process Activation Service (WAS) use the virtual directory as their base address."</p>\n\n<p><a href="http://msdn.microsoft.com/en-us/library/ee358768(v=vs.110).aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/ee358768(v=vs.110).aspx</a></p>\n'}]
['https://Stackoverflow.com/questions/56249', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5772/']