Saturday, July 7, 2012

Exchange Server 2010 Autodiscover Activation Exception

My Exchange Server 2010 installation kept generating errors in the event log that looked like this:

Exception: System.ServiceModel.ServiceActivationException: The service '/Autodiscover/autodiscover.xml' cannot be activated due to an exception during compilation. The exception message is: This collection already contains an address with scheme http. There can be at most one address per scheme in this collection.

Indeed in my IIS installation I have multiple websites that share the same port number. In fact, the default website that hosts the auto discover service supports several different domain names in its header.

After a little googling around, I found a solution here:

http://stackoverflow.com/questions/561823/wcf-error-this-collection-already-contains-an-address-with-scheme-http

Essentially what I needed to do was to open up the "web.config" file in "C:\Program Files\Microsoft\Exchange Server\V14\ClientAccess\Autodiscover", and add the following lines in the
"system.serviceMode/serviceHostingEnvironment" section:

<baseaddressprefixfilters>
<add prefix="http://programount.com"></add> </baseaddressprefixfilters>

There were similiar errors for some other Exchange 2010 services, and the same fix worked for those as well.

2 comments:

  1. Hi,

    I am trying to fix this issue on my server. Can you tell me where exactly to enter this code in the web.config file I cannot seem to get it right!

    ReplyDelete
  2. Hi Alex,

    Can you find the file "C:\Program Files\Microsoft\Exchange Server\V14\ClientAccess\Autodiscover\web.config"? It is in that file.

    ReplyDelete