Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/29.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在active directory中使用ASP.NET身份验证?_Asp.net_Authentication_Active Directory - Fatal编程技术网

如何在active directory中使用ASP.NET身份验证?

如何在active directory中使用ASP.NET身份验证?,asp.net,authentication,active-directory,Asp.net,Authentication,Active Directory,我的配置设置如下所示: <configuration> <connectionStrings> <add name="ADConnectionString" connectionString="LDAP://myldap/CN=Users,DC=nevco,DC=local"/> </connectionStrings> <system.web> <authentication mode="Forms">

我的配置设置如下所示:

<configuration>
  <connectionStrings>
    <add name="ADConnectionString" connectionString="LDAP://myldap/CN=Users,DC=nevco,DC=local"/>
  </connectionStrings>
<system.web>
<authentication mode="Forms">
  <forms name=".ADAuthCookie" timeout="10" loginUrl="Login.aspx" defaultUrl="Default.aspx" />
</authentication>
    <membership defaultProvider="DomainLoginMembershipProvider">
      <providers>
        <clear/>
        <add name="DomainLoginMembershipProvider"
             type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=2.0.0.0,Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
             connectionStringName="ADConnectionString" attributeMapUsername="sAMAccountName" />
      </providers>
     </membership>
  </system.web>
</configuration>

我可以尝试登录,但每次它都说我使用了错误的用户名/密码。看起来我做错了什么吗?我有没有办法找到更多关于为什么找不到我的用户名/通行证的信息

更新:


我需要在“我的会员资格/提供者”部分提供用户名和密码吗?

为什么要让用户登录

请尝试此提供商

<roleManager enabled="true" defaultProvider="AspNetWindowsTokenRoleProvider" />

您的网站必须在IIS中安装,为什么要让用户登录

请尝试此提供商

<roleManager enabled="true" defaultProvider="AspNetWindowsTokenRoleProvider" />

您的网站必须在IIS中设置好。好的,我最后使用LDAP浏览器来检查结构。经过一番推诿之后,我将LDAP url更改为:

LDAP://myldap/DC=nevco,DC=local

它开始工作了。希望这对别人有帮助

好的,我最后使用LDAP浏览器来检查结构。经过一番推诿之后,我将LDAP url更改为:

LDAP://myldap/DC=nevco,DC=local

它开始工作了。希望这对别人有帮助

如果使用
LDAP://myldap/
时出错,指定的连接字符串不代表有效的LDAP adspath。如果使用
LDAP://myldap/
时出错,指定的连接字符串不代表有效的LDAP adspath。因此将使用任何窗口他们登录以访问网站的帐户?如果他们是从他们的家庭计算机访问呢?如果有人连接到该域,这将起作用。就像一个内部网站。它可能无法作为面向公众的网站使用,因为您必须将该网站设置为使用匿名访问。因此,这将使用他们登录的任何windows帐户访问该网站?如果他们是从他们的家庭计算机访问呢?如果有人连接到该域,这将起作用。就像一个内部网站。它可能无法作为面向公众的网站使用,因为您必须将网站设置为使用匿名访问。