2012-02-24 2 views
8

Недавно я настроил свой SDL Tridion 2011 CME для использования нескольких заголовков хостов. Чтобы включить загрузку CME, я устанавливаю WCF.RedirectTo в соответствующий файл web.config. Однако моя основная служба больше не работает. Я получаю следующую ошибку:Я установил свой экземпляр SDL Tridion 2011 для запуска с несколькими заголовками хостов, и теперь Core Service не работает. Как это исправить?

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'.

Как исправить это?

ответ

9

Вы можете позволили несколько привязок сайта путем редактирования web.config для Tridion UI и основные службы

  • Откройте web.config в [Tridion Установка папки] \ Web \ WebUI \ WebRoot \
  • Найти раздел serviceHostingEnvironment Добавить новый атрибут к этому узлу для multipleSiteBindingsEnabled = «истинный»
  • Это должно выглядеть как <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true">
  • Сохраните файл
  • Откройте web.config в [Tridion Папка установки] \ WebServices \
  • Найдите раздел
  • serviceHostingEnvironment Добавить новый атрибут к этому узлу для multipleSiteBindingsEnabled = «истинный» Это должно выглядеть как <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true">
  • Сохраните файл

Если вы не хотите, чтобы включить его для всех URL, вы можете включить его для определенных из них, как:

<system.serviceModel> 
    <serviceHostingEnvironment> 
     <baseAddressPrefixFilters> 
      <add prefix="http://test1.tridion.com"/> 
      <add prefix="http://test2.tridion.com"/> 
     </baseAddressPrefixFilters> 
    </serviceHostingEnvironment> 
</system.serviceModel> 
+2

multipleSiteBindings уже было верно в WebRoot \ мы b.config. Его вообще не было в webservices \ web.config. Добавив его и установив его в true, исправлена ​​проблема. –