Sitecore功能ActiveDirectory-将AD域添加到domainManager不会';行不通

Sitecore功能ActiveDirectory-将AD域添加到domainManager不会';行不通,sitecore,sitecore8,sitecore-mvc,Sitecore,Sitecore8,Sitecore Mvc,我正在使用Habitat Sitecore。它有一系列的基础和特色项目。其中一个功能项目是Sitecore.feature.ActiveDirectory。 我正在尝试从修补程序文件配置域。Kam在本文中概述了这一点 在/App_config/Include/Feature/Feature.ActiveDirectory.config中,我添加了以下内容: <?xml version="1.0" encoding="utf-8"?> <configuration xmlns:

我正在使用Habitat Sitecore。它有一系列的基础和特色项目。其中一个功能项目是Sitecore.feature.ActiveDirectory。 我正在尝试从修补程序文件配置域。Kam在本文中概述了这一点

在/App_config/Include/Feature/Feature.ActiveDirectory.config中,我添加了以下内容:

<?xml version="1.0" encoding="utf-8"?>

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:set="http://www.sitecore.net/xmlconfig/set/">
  <sitecore>
    <switchingProviders>
      <membership>
        <provider providerName="ad" storeFullNames="false" wildcard="*" domains="ad" />
      </membership>
      <roleManager>
        <provider providerName="ad" storeFullNames="false" wildcard="*" domains="ad" />
      </roleManager>
    </switchingProviders>
    <domainManager>
      <domains>
        <domain id="ad" type="Sitecore.Security.Domains.Domain, Sitecore.Kernel" patch:after="domain[@id='default']">
          <param desc="name">$(id)</param>
          <ensureAnonymousUser>false</ensureAnonymousUser>
          <locallyManaged>false</locallyManaged>
          <isDefault>false</isDefault>
        </domain>
      </domains>
    </domainManager>
  </sitecore>
</configuration>

$(id)
错误的
错误的
错误的
但是,我得到以下例外情况: 找不到Sitecore.Security.SwitchingRoleProvider提供程序/域映射中指定的域。域名:ad 在



我做错了什么?

域必须直接添加到
Domains.config
,位于
App\u config\Security
中。它无法修补。将其作为构建序列的一部分。

如果您将域直接添加到位于
App\u config\Security
中的
Domains.config
,是否有效?是。但是,这不是理想的解决方案。对站点的任何升级都会覆盖更改。当然可以。但并不是所有问题都可以解决。
<add name="switcher" type="Sitecore.Security.SwitchingRoleProvider, Sitecore.Kernel" applicationName="sitecore" mappings="switchingProviders/roleManager" />