8

我最近将我的 SDL Tridion 2011 CME 配置为使用多个主机标头。为了使 CME 能够加载,我在相应的 web.config 中设置了 WCF.RedirectTo。但是,我的核心服务不再起作用。我收到以下错误:

WebHost 未能处理请求。发件人信息:System.ServiceModel.ServiceHostingEnvironment+HostingManager/63835064 异常:System.ServiceModel.ServiceActivationException:服务'/webservices/CoreService.svc'由于编译过程中的异常而无法激活。异常消息是:这个集合已经包含一个带有 http 方案的地址。此集合中的每个方案最多可以有一个地址。如果您的服务托管在 IIS 中,您可以通过将“system.serviceModel/serviceHostingEnvironment/multipleSiteBindingsEnabled”设置为 true 或指定“system.serviceModel/serviceHostingEnvironment/baseAddressPrefixFilters”来解决问题。参数名称:项目。---> System.ArgumentException:这个集合已经包含一个带有 http 方案的地址。此集合中的每个方案最多可以有一个地址。如果您的服务托管在 IIS 中,您可以通过将“system.serviceModel/serviceHostingEnvironment/multipleSiteBindingsEnabled”设置为 true 或指定“system.serviceModel/serviceHostingEnvironment/baseAddressPrefixFilters”来解决问题。

我该如何解决?

4

1 回答 1

9

您可以通过编辑 Tridion UI 和核心服务的 web.config 来启用多个站点绑定:

  • 打开 [Tridion 安装文件夹]\web\WebUI\WebRoot\ 中的 web.config
  • 找到 serviceHostingEnvironment 部分为 multipleSiteBindingsEnabled="true" 向该节点添加一个新属性
  • 这应该看起来像<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true">
  • 保存文件
  • 打开 [Tridion 安装文件夹]\webservices\ 中的 web.config
  • 找到 serviceHostingEnvironment 部分
  • 为 multipleSiteBindingsEnabled="true" 向该节点添加一个新属性 这应该看起来像<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true">
  • 保存文件

如果您不想为所有 URL 启用它,您可以为特定 URL 启用它,例如:

<system.serviceModel>  
    <serviceHostingEnvironment>  
        <baseAddressPrefixFilters>  
            <add prefix="http://test1.tridion.com"/>  
            <add prefix="http://test2.tridion.com"/>  
        </baseAddressPrefixFilters>  
    </serviceHostingEnvironment>  
</system.serviceModel>
于 2012-02-24T09:59:09.917 回答