捕捉的ActiveDirectory" ADDUSER"事件发生在C#中? [英] Catch ActiveDirectory "addUser" Event in c#?

查看:114
本文介绍了捕捉的ActiveDirectory" ADDUSER"事件发生在C#中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有自动登录,在我们系统的能力。

We have the ability of "AutoLogin" in our systems.

所以,如果我在公元为约翰创建一个新用户 - 那么约翰访问内网网站的能力(我们查询AD,看看当前用户是AD)

So if I create a new user in AD as "John" - then John has the ability to access the intranet web site ( we query AD to see if the current user is in AD).

但是

我们也有一个用户表(SQL Server)的,需要有名字名字新用户。

We also have a users table (SQL Server) which needs to have the FirstName and LastName of the new user.

我们要更新用户表在公元一创建新用户每次 - 一些C#code应该运行输入相关数据到SQL Server (和其他一些东西)。

We want to update that Users table each time a new user in AD is created - some C# code should be run to enter the relevant data into SQL Server (and some other things).

我怎么能赶上的情况下,新用户创建的广告?

HOw can I catch the event of "new user in AD created" ?

推荐答案

查看瑞安邓恩的优秀博客文章:

Check out Ryan Dunn's excellent blog post:

实施变更通知在.NET

这是处理这个确切的话题。他提供了三个选项:

that deals with this exact topic. He offers three options:

  • 查询使用uSNChanged更改
  • 在轮询使用目录同步控制变更
  • 更改通知在Active Directory

和显示的优点和缺点为每个选项和一些C#code为第三个选项(更改通知)。

and shows pros and cons for each of the options, and some C# code for the third option (Change Notifications).

这篇关于捕捉的ActiveDirectory" ADDUSER"事件发生在C#中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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