C# LDA身份验证类型不在System.DirectoryServices.ActiveDirectory中
我需要使用Active Directory对我网站上的用户进行身份验证。我们的开发团队告诉我使用如下代码:C# LDA身份验证类型不在System.DirectoryServices.ActiveDirectory中,c#,asp.net,authentication,active-directory,C#,Asp.net,Authentication,Active Directory,我需要使用Active Directory对我网站上的用户进行身份验证。我们的开发团队告诉我使用如下代码: using System.DirectoryServices.ActiveDirectory; public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { LdapAuthentication ob
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中,但ldapaauthentication类型不在System.directory.ActiveDirectory中。它表示找不到类型或命名空间名称“LdapAuthentication”。。。谁能告诉我我做错了什么?谢谢。你为什么认为它应该在那里?LdapAuthentication不是.Net framework中可用的类型。然而,我确实遇到过他们描述的构建这样一个类的地方。是的,你说得对。LdapAuthentication是我需要创建的一个类。谢谢