2012-02-24 43 views
8

我最近配置了我的SDL Tridion 2011 CME以使用多個主機頭。爲了啓用CME加載,我在相應的web.config中設置了WCF.RedirectTo。但是,我的核心服務不再有效。我收到以下錯誤:我將SDL Tridion 2011實例設置爲使用多個主機頭運行,現在覈心服務不起作用。我如何解決它?

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

您可以通過編輯外表套上UI和核心服務的web.config中啓用了多個站點綁定:

  • 公開賽在web.config [外表套上安裝文件夾] \網絡\ WebUI中\的WebRoot \
  • 找到serviceHostingEnvironment部分添加一個新的屬性到節點multipleSiteBindingsEnabled =「真」
  • 這應該再像<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true">
  • 保存文件
  • 打開在web.config [外表套上安裝文件夾] \ web服務\
  • 找到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解決了問題。 – 2012-02-24 10:52:22

相關問題