我现在正要开发一个人力资源系统,用asp.net2.0和sqlserver2000,现在用户要用Active Directory 全面集成,管理用户认证、密码,而我对Active Directory从来没有接触过,我在网上搜了一些文档,看得很糊涂;如果用AD这玩意管理用户和密码,那在人力资源系统数据库里还用不用设计用户密码表,谁能告诉我Active Directory咋用,咋配置,以及跟asp.net2.0开发的人力资源系统怎么集成啊,步骤是怎样的,我把我所有的分想办法全给他,天地做证,顺便说一下,语言用的是c#。

解决方案 »

  1.   

    应该是集成验证的问题,这需要IIS配置安装在域中
    你可以在程序中直接对域操作。
      

  2.   

    看一下System.DirectoryServices,特别是其中的DirectoryEntry例子
    Changing a Password in Active Directory with C# ASP .NET
    http://www.primaryobjects.com/CMS/Article66.aspxHow To: Use Forms Authentication with Active Directory in ASP.NET 2.0
    http://msdn2.microsoft.com/en-us/library/ms998360.aspxWeb-based Active Directory Login
    http://www.codeproject.com/asp/webactivedirlogin.asp
      

  3.   

     First, you will get the DirectoryEntry object and then invoke the ChangePassword function.// Connect to Active Directory and get the DirectoryEntry object.
    // Note, ADPath is an Active Directory path pointing to a user. You would have created this
    // path by calling a GetUser() function, which searches AD for the specified user
    // and returns its DirectoryEntry object or path. See here.
    DirectoryEntry oDE;
    oDE = new DirectoryEntry(ADPath, ADUser, ADPassword, AuthenticationTypes.Secure);try
    {
       // Change the password.
       oDE.Invoke("ChangePassword", new object[]{strOldPassword, strNewPassword});
    }
    catch (Exception excep)
    {
       Debug.WriteLine("Error changing password. Reason: " + excep.Message);
    }