无法使用 Windows 域\用户名连接到 ADAM
我在从 Commerce Server 2007 ASP .NET 解决方案连接到 ADAM 实例时遇到一些困难,并且我相信它与我的配置文件有某种关系。简而言之,我可以使用当前的用户名/密码通过 ADAM-ADSIEdit 连接到 ADAM,但是当我将其放入 web.config 中时,我收到“解析器错误消息:登录失败:未知的用户名或错误密码”。
<connectionStrings>
<add name="LDAPConnection" connectionString="LDAP://<domain/>:389/<Partition DN>" />
</connectionStrings>
<membership defaultProvider="MembershipADAMProvider">
<providers>
<add name="MembershipADAMProvider"
type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="LDAPConnection"
connectionProtection="None"
connectionUsername="<domain>\<username>"
connectionPassword="<password>"/>
</providers>
</membership>
我已经尝试了很多方法来解决这个问题,但还没有提出任何合理的解决方案。我从连接字符串开始,没有用户名或密码。我收到一条错误消息,提示我无法建立安全连接。那是我添加connectionProtection =“None”行的时候。然后它说如果没有安全连接,我无法使用默认凭据,因此我添加了用户名和密码字段。创建 ADAM 实例时,我使用了当前的 Windows 登录凭据。我尝试在 web.config 中使用我的 Windows 登录凭据,并且尝试使用各种域名,几乎任何我能想到的域名。我完全不明白为什么我无法与 ldp 绑定,并且我可以使用这些域\用户名和密码在 ASIEdit 中连接,但不能从我的 CommerceServer ASP .NET 应用程序连接...我还缺少其他步骤吗?
谢谢, 约翰
I'm having some difficulty connecting to an ADAM instance from my Commerce Server 2007 ASP .NET solution, and I believe it relates to my config file somehow. The short version is that I can connect to ADAM through ADAM-ADSIEdit with my current username/password, but when I put this in my web.config i get "Parser Error Message: Logon failure: unknown user name or bad password."
<connectionStrings>
<add name="LDAPConnection" connectionString="LDAP://<domain/>:389/<Partition DN>" />
</connectionStrings>
<membership defaultProvider="MembershipADAMProvider">
<providers>
<add name="MembershipADAMProvider"
type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="LDAPConnection"
connectionProtection="None"
connectionUsername="<domain>\<username>"
connectionPassword="<password>"/>
</providers>
</membership>
I've tried a bunch of things to fix this and haven't come up with any kind of reasonable solution. I started with just the connection String and no username or password. I got an error saying that I could not make a secure connection. that's when I added the connectionProtection="None" line. Then it said I could not use default credentials without a secure connection, so I added the Username and Password fields. When I created the ADAM instance, I used the current Windows login credentials. I've tried to use my windows login credentials here in web.config, and I've tried with various domain names, pretty much anything I could think of. I'm totally lost why I cant bind with ldp and I can connect in ASIEdit with these domain\username and password but can't from my CommerceServer ASP .NET application...Is there some other step I'm missing?
Thanks,
John
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该遵循信息这里,有很多关于安全连接以及如何在 ADAM 实例中出于开发目的禁用它们的好东西。
You should follow the information here, there is a lot of good stuff about secure connections and how to disable them within your ADAM instance for development purposes.