我将 SDL Tridion 2011 实例设置为使用多个主机标头运行,但现在核心服务不起作用.我如何解决它? [英] 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?

查看:27
本文介绍了我将 SDL Tridion 2011 实例设置为使用多个主机标头运行,但现在核心服务不起作用.我如何解决它?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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 无法处理请求.发件人信息: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"来解决该问题.

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?

推荐答案

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

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

  • 打开 [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 启用它,例如:

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>

这篇关于我将 SDL Tridion 2011 实例设置为使用多个主机标头运行,但现在核心服务不起作用.我如何解决它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆