我正在使用online-ldap-test-server与Sitecore 8.1集成以进行测试。我为它做的配置如下:
连接字符串:<add name="ADConnString" connectionString="LDAP://ldap.forumsys.com:389/OU=scientists,DC=example,DC=com"/>
提供商:
<membership defaultProvider="sitecore" hashAlgorithmType="SHA1">
<providers>
<clear/>
<add name="ad" type="LightLDAP.SitecoreADMembershipProvider" connectionStringName="ADConnString" applicationName="sitecore" minRequiredPasswordLength="1" minRequiredNonalphanumericCharacters="0" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" connectionUsername="" connectionPassword="" connectionProtection="Secure" attributeMapUsername="sAMAccountName" enableSearchMethods="true" />
<add name="sitecore" type="Sitecore.Security.SitecoreMembershipProvider, Sitecore.Kernel" realProviderName="switcher" providerWildcard="%"
raiseEvents="true"/>
<add name="sql" type="System.Web.Security.SqlMembershipProvider" connectionStringName="core" applicationName="sitecore" minRequiredPasswordLength="1"
minRequiredNonalphanumericCharacters="0" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="256"/>
<add name="switcher" type="Sitecore.Security.SwitchingMembershipProvider, Sitecore.Kernel" applicationName="sitecore"
mappings="switchingProviders/membership"/>
</providers>
</membership>
<roleManager defaultProvider="sitecore" enabled="true">
<providers>
<clear/>
<add name="ad" type="LightLDAP.SitecoreADRoleProvider" connectionStringName="ADConnString" applicationName="sitecore" username="" password="" attributeMapUsername="sAMAccountName" cacheSize="2MB" />
<add name="sitecore" type="Sitecore.Security.SitecoreRoleProvider, Sitecore.Kernel" realProviderName="switcher" raiseEvents="true"/>
<add name="sql" type="System.Web.Security.SqlRoleProvider" connectionStringName="core" applicationName="sitecore"/>
<add name="switcher" type="Sitecore.Security.SwitchingRoleProvider, Sitecore.Kernel" applicationName="sitecore"
mappings="switchingProviders/roleManager"/>
</providers>
</roleManager>
<profile defaultProvider="sitecore" enabled="true" inherits="Sitecore.Security.UserProfile, Sitecore.Kernel">
<providers>
<clear/>
<add name="ad" type="LightLDAP.SitecoreADProfileProvider" connectionstringname="ADConnString" applicationname="sitecore" username="" password="" sitecoremapdomainname="ad"></add>
<add name="sitecore" type="Sitecore.Security.SitecoreRoleProvider, Sitecore.Kernel" realProviderName="switcher" raiseEvents="true" />
<add name="sql" type="System.Web.Profile.SqlProfileProvider" connectionStringName="core" applicationName="sitecore"/>
<add name="switcher" type="Sitecore.Security.SwitchingProfileProvider, Sitecore.Kernel" applicationName="sitecore"
mappings="switchingProviders/profile"/>
</providers>
转换提供商:
<switchingProviders>
<membership>
<provider providerName="sql" storeFullNames="true" wildcard="%" domains="*"/>
<provider providerName="ad" storeFullNames="false" wildcard="*" domains="ad" />
</membership>
<roleManager>
<provider providerName="sql" storeFullNames="true" wildcard="%" domains="*" ignoredUserDomains="" allowedUserDomains=""/>
<provider providerName="ad" storeFullNames="false" wildcard="*" domains="ad" />
</roleManager>
<profile>
<provider providerName="sql" storeFullNames="true" wildcard="%" domains="*" ignoredDomains=""/>
<provider providerName="ad" storeFullNames="false" wildcard="*" domains="ad" />
</profile>
Domains.config
<domain name="ad" ensureAnonymousUser="false"/>
但是我收到一条错误,指出“丢失或清空连接字符串”。只有在切换提供程序和提供程序部分下添加配置文件提供程序的条目时,才会出现此错误。有关详细信息,请参阅下面显示的屏幕截图:
Missing or Empty Connection String Error
当我评论配置文件提供程序条目时,虽然我没有收到此错误和我的域的成员身份,但角色提供程序似乎已启用(在admin / providerstatus.aspx中),但我无法使用AD用户登录。 在这方面的任何帮助表示赞赏。另外,mongoDb是否可以发挥LDAP Sitecore集成的任何作用?
答案 0 :(得分:0)
我不完全确定,但似乎您在配置文件提供程序定义中使用小写的所有参数。请尝试使用正确的外壳。
关于MongoDB,LDAP不需要MongoDB。