简体   繁体   English

ASP.Net中的Active Directory身份验证-需要连接字符串帮助

[英]Active Directory authentication in ASP.Net — connection string help needed

I am new to Active Directory and asp.net authentication and following this article http://msdn.microsoft.com/en-us/library/ms998360.aspx 我是Active Directory和asp.net身份验证的新手,并且紧随本文http://msdn.microsoft.com/zh-CN/library/ms998360.aspx

to get it done. 完成它。 In one place in the article, it says to define the Active Directory connection string, and the example given is: 在文章的一个地方,它说要定义Active Directory连接字符串,给出的示例是:

 <connectionStrings>
     <add name="ADConnectionString"
        connectionString="LDAP://testdomain.test.com/CN=Users,DC=testdomain,DC=test,DC=com" />
 </connectionStrings>

I have no idea about this connection string. 我不知道这个连接字符串。 Can anyone please explain what this connection string is or point to some article which has details. 任何人都可以请解释这个连接字符串是什么,或者指向一些包含详细信息的文章。 I have other Active Directory experts in the team but they are network admins. 我在团队中还有其他Active Directory专家,但他们是网络管理员。 so another way for me to know how to explain to them what i need? 那么让我知道如何向他们解释我需要什么的另一种方式?

thanks 谢谢

Here's how we connected: 连接方式如下:

<add name="ADConnectionString" connectionString="LDAP://domaincontrollername:port/DC=domainname,DC=domainnamepart2"/>

We used one of our domain controller server names and used port 389. Our domain is something like username@domainpart1.domainpart2 so we entered it as above.... if you only have username@domain then it would just have one DC. 我们使用了其中一个域控制器服务器名称,并使用了端口389。我们的域类似于username@domainpart1.domainpart2,因此我们按上面的步骤输入。...如果您只有username @ domain,那么它将只有一个DC。

This is not the only way to connect but you get the idea. 这不是唯一的联系方式,但您会明白。

You can use softerra ldap browser (free version) to help figure out how to connect to your servers and then use that string to help you get it right in asp.net. 您可以使用softerra ldap浏览器 (免费版)帮助弄清楚如何连接到服务器,然后使用该字符串帮助您在asp.net中正确设置它。 This is how we got started. 这就是我们开始的方式。

A connection string is a string combined of properties/values needed by .NET framework (in this case) to connect to a database. 连接字符串是.NET框架(在这种情况下)连接数据库所需的属性/值的组合字符串。 Because there are various types of database and they work in a different way so there are also different ways of writing a connection string. 由于存在各种类型的数据库,并且它们以不同的方式工作,因此也存在不同的编写连接字符串的方式。

I personally never did make anything that should connect to a Active Directory but I know a very good place where you could find out how to write a connection string to Active Directory (and other known database-types). 我个人从来没有做过任何应该连接到Active Directory的事情,但是我知道一个非常好的地方,您可以在其中找到如何向Active Directory(以及其他已知的数据库类型)写入连接字符串。 Visit ConnectionStrings.com to get more information on that. 访问ConnectionStrings.com以获取有关此信息的更多信息。

To get a more general explanation of what a connection string is try searching for "connection string" on MSDN or Wikipedia. 要获得有关什么是连接字符串的更一般的解释,请尝试在MSDN或Wikipedia上搜索“连接字符串”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM