locked
can't check attribute "nsroledn" RRS feed

  • Question

  • User-737517480 posted
    I am wirting an user admin program with .Net and Sun directory.  However, facing an unexpected problems that need your help.
    The sun directory has a attribute named "nsroledn"
    I found that it will contains sth like "cn=nsmanageddisabledrole,dc=xxxx,dc=com" when I deactivate a user.
    I works when I try to deactivate it. sth like
    User.Properties("nsRoleDN").Add("cn=nsmanageddisabledrole,dc=xxxx,dc=com")

    However, if I want to check whether this attribute contain value / or contains this attribute.  it doesn't work at all.
    But it works for other attribute like:

    If (User.Properties.Contains("miAutoreplySubject")) Then
    End If

    Any help?

    Wednesday, July 12, 2006 3:49 AM

All replies

  • User-737517480 posted
    futher search the internet, it seems that it's an Operational attributes.  So, how can i handel the operational attributes? it won't work with DirectorySearcher?

    I am wirting an user admin program with .Net and Sun directory.  However, facing an unexpected problems that need your help.
    The sun directory has a attribute named "nsroledn"
    I found that it will contains sth like "cn=nsmanageddisabledrole,dc=xxxx,dc=com" when I deactivate a user.
    I works when I try to deactivate it. sth like
    User.Properties("nsRoleDN").Add("cn=nsmanageddisabledrole,dc=xxxx,dc=com")

    However, if I want to check whether this attribute contain value / or contains this attribute.  it doesn't work at all.
    But it works for other attribute like:

    If (User.Properties.Contains("miAutoreplySubject")) Then
    End If

    Any help?

    Wednesday, July 12, 2006 9:31 PM
  • User1354132231 posted
    Not sure on this one.  If you don't see it in the property cache that tends to mean that it is either really not there or it is a constructed attribute that you need to load specifically.  You can try to see if it is the latter case by requesting it to be loaded:

    User.RefreshCache(new string[]{"nsRoleDN"});

    Thursday, July 13, 2006 1:07 PM
  • User-737517480 posted
    yes, it works well

    Not sure on this one.  If you don't see it in the property cache that tends to mean that it is either really not there or it is a constructed attribute that you need to load specifically.  You can try to see if it is the latter case by requesting it to be loaded:

    User.RefreshCache(new string[]{"nsRoleDN"});

    Thursday, July 13, 2006 9:33 PM