Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I set up my SDL Tridion 2011 instance to run with multiple host headers and now the Core Service doesn't work. How do I fix it?

Tags:

tridion

I recently configured my SDL Tridion 2011 CME to use multiple host headers. To enable the CME to load I set WCF.RedirectTo in the appropriate web.config. However, my Core Service no longer works. I get the following error:

WebHost failed to process a request. Sender Information: System.ServiceModel.ServiceHostingEnvironment+HostingManager/63835064 Exception: System.ServiceModel.ServiceActivationException: The service '/webservices/CoreService.svc' 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. If your service is being hosted in IIS you can fix the problem by setting 'system.serviceModel/serviceHostingEnvironment/multipleSiteBindingsEnabled' to true or specifying 'system.serviceModel/serviceHostingEnvironment/baseAddressPrefixFilters'. Parameter name: item. ---> System.ArgumentException: This collection already contains an address with scheme http. There can be at most one address per scheme in this collection. If your service is being hosted in IIS you can fix the problem by setting 'system.serviceModel/serviceHostingEnvironment/multipleSiteBindingsEnabled' to true or specifying 'system.serviceModel/serviceHostingEnvironment/baseAddressPrefixFilters'.

How do I fix this?

like image 578
Jeremy Grand-Scrutton Avatar asked Feb 24 '12 09:02

Jeremy Grand-Scrutton


1 Answers

You can enabled the multiple site bindings by editing the web.config for the Tridion UI and the Core Service:

  • Open the web.config in [Tridion Install Folder]\web\WebUI\WebRoot\
  • Find the serviceHostingEnvironment section Add a new attribute to that node for multipleSiteBindingsEnabled="true"
  • This should then look like <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true">
  • Save the file
  • Open the web.config in [Tridion Install Folder]\webservices\
  • Find the serviceHostingEnvironment section
  • Add a new attribute to that node for multipleSiteBindingsEnabled="true" This should then look like <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true">
  • Save the file

If you don't want to enable it for all URL's you can enable it for specific ones like:

<system.serviceModel>  
    <serviceHostingEnvironment>  
        <baseAddressPrefixFilters>  
            <add prefix="http://test1.tridion.com"/>  
            <add prefix="http://test2.tridion.com"/>  
        </baseAddressPrefixFilters>  
    </serviceHostingEnvironment>  
</system.serviceModel>
like image 170
Ryan Durkin Avatar answered Dec 21 '22 11:12

Ryan Durkin