超级高难问题 利用ASP控制修改AD帐号

来源:百度知道 编辑:UC知道 时间:2024/05/27 17:20:42
公司的OA系统是通过每个人的活动目录来验证登录的。如何实现在WEB页面修改自己的密码;如何实现管理员可以在WEB页面上创建和管理活动目录的用户?可以用asp或asp.net来实现


ASP的不知道
.Net的给你点例子 你能看懂的
创建用户方法

DirectoryEntry de=new DirectoryEntry();
de.Path="LDAP://celticrain/CN=Users,DC=eichkogelstrasse,DC=local";

DirectoryEntries users=de.Children;

DirectoryEntry user=users.Add("CN=John Doe","user");

user.CommitChanges();

public class AdUser : AdItem
{
// http://msdn.microsoft.com/library/en-us/dnclinic/html/scripting09102002.asp
public DateTime PasswordExpirationDate
{
get
{
if(IsPasswordNotExpire)
{
return DateTime.MaxValue; // 帐号被设置为密码永不过期
}
else
{
long lastChanged;

try
{
lastChanged = GetLongValue((