DirectorySearch无法找到新添加的组 [英] DirectorySearch unable to find newly added groups

查看:46
本文介绍了DirectorySearch无法找到新添加的组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

deSearch.Filter = ("(&(objectCategory=group)(objectClass=group)(samAccountName=Payment*))");

以上是我用于DirectorySearch的过滤器。我在Active Directory中添加了新组,其前缀为"Payment",但搜索没有返回任何内容。

Above is my filter that Im using for my DirectorySearch. I've added new groups in my Active Directory which have the prefix of 'Payment' but the search returns nothing.

如果我将samAccountName = Payment更改为samAccountName = Dns,则返回包含的组Dns前缀。如果我删除了samAccountName过滤器,它将返回所有组,但仍然不是支付组。

If I change samAccountName=Payment to samAccountName=Dns it returns the groups with the Dns prefix. If I remove the samAccountName filter it returns all groups but still not Payment groups.

我认为付款组的唯一不同之处在于它们是新的,所以可能还没有"承诺"到公元。我关闭了广告并重新开放但没有成功。

The only thing I feel is different about the Payment groups is that they are new so maybe havent been 'committed' to the AD. I've closed the AD and reopened but no success.

感谢任何信息/帮助。

推荐答案

您好ChrisDeweyJamesSouthall,

Hi ChrisDeweyJamesSouthall,

感谢您发布此处。

您的问题,你能确定你在AD中添加这个组吗?如何使用C#添加此组?

For your question, could you make sure you have add this group in AD? How do add this group using C#?

如果
UsePropertyCache
属性为true,您希望提交缓存更改,请调用

CommitChanges
方法。要在更改目录后更新缓存中的值,请调用

RefreshCache
方法。如果在调用CommitChanges之前调用RefreshCache,请检查属性缓存的任何未提交的更改都将丢失。

If the UsePropertyCache property is true and you want to commit cached changes, call the CommitChanges method. To update values in the cache after changes to the directory are made, call the RefreshCache method. Please check thst if you call RefreshCache before calling CommitChanges, any uncommitted changes to the property cache will be lost.

如果可能,请提供您用于添加组的代码。

最好的问候,

Wendy


这篇关于DirectorySearch无法找到新添加的组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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