问题描述
|
我正在检查这是否是Sitecore错误,或者是否缺少明显的内容。
编辑说明:我遇到的问题是,我试图在Domains.config文件中设置配置设置,以便Sitecore不应为(域以这种方式设置。但是,如果我在域上使用Domain.GetUsers()函数,仍然会返回匿名用户。
成员资格提供程序是自定义构建的,并以只读模式连接到LDAP。
细节
使用Sitecore 6.4.1并在App_Config / Security / domains.config中指定以下域配置
<domain name=\"DOMAINNAME\" ensureAnonymousUser=\"false\" anonymousUserName=\"\" everyoneRoleName=\"\" />
以及该domain.config文件中的这些注释
anonymousUserName: <snip> Set to blank to disable the anonymous user for the domain. Optional
ensureAnonymousUser: Indicates if the domain should ensure that an anonymous user for the domain exists in the Membership database. Optional - default value: false
everyoneRoleName: <snip> Set to blank to disable the everyone role for the domain. Optional - default value: Everyone
如果我使用以下代码,
List<Sitecore.Security.Accounts.User> users = new List<Sitecore.Security.Accounts.User>();
var domain = Sitecore.Security.Domains.Domain.GetDomain(DOMAINNAME);
users.AddRange(domain.GetUsers().ToArray<Sitecore.Security.Accounts.User>());
我将匿名用户包括在用户列表中。我从domain.config文件中的注释中假设,如果我按照上述方式设置域,则不应该获得匿名用户。
有什么明显的我想念的东西吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)