2012-08-02 15 views
-1

我需要使用Active Directory對我的網站上的用戶進行身份驗證。我們的開發團隊告訴我用這樣的代碼:LdapAuthentication類型不在System.DirectoryServices.ActiveDirectory中

using System.DirectoryServices.ActiveDirectory; 

public partial class _Default : System.Web.UI.Page 
{ 

    protected void Page_Load(object sender, EventArgs e) 
    { 

     LdapAuthentication objAuthenticate; 

我能夠給DirectoryServices.dll添加到我的bin目錄,我增加了裝配到我的web.config但LdapAuthentication類型不在系統.Directory.ActiveDirectory。它說沒有找到類型或名稱空間名稱'LdapAuthentication'...任何人都可以告訴我我做錯了什麼?謝謝。

回答

1

爲什麼你認爲它應該在那裏? LdapAuthentication不是在.Net框架中可用的類型。但是,我確實碰到過他們描述要建造這樣一個班的this howto page

+0

是的,你是對的。 LdapAuthentication是我需要創建的類。謝謝。 – CodeGurl 2012-08-02 10:21:18

相關問題