I
irrbloss
Hi, I'm building a C#-application that will simplify my daily work
(adding/removing/updating users in the AD). I'm using functions from
the System.DirectoryServices-namespace. When I have added a user I
want to set user-rights on a folder (which I create in my
application). The problem is that it takes a while until the user has
been added to the AD. If I just go on with setting the user-rights on
the folder I get an exception telling me there's no such user and
everything fails. I would like to know the best way to know when the
user has been added to the AD so I can go on with setting the user-
rights. Polling the AD seems like a bad idea (lots of overhead?).
Right now I'm using a 5 second delay between the user-creation and
setting the user-rights, I know that's a bad idea too, but at least
I'm not generating lots of queries to the AD.
(adding/removing/updating users in the AD). I'm using functions from
the System.DirectoryServices-namespace. When I have added a user I
want to set user-rights on a folder (which I create in my
application). The problem is that it takes a while until the user has
been added to the AD. If I just go on with setting the user-rights on
the folder I get an exception telling me there's no such user and
everything fails. I would like to know the best way to know when the
user has been added to the AD so I can go on with setting the user-
rights. Polling the AD seems like a bad idea (lots of overhead?).
Right now I'm using a 5 second delay between the user-creation and
setting the user-rights, I know that's a bad idea too, but at least
I'm not generating lots of queries to the AD.