ActiveDirectoryMembershipProvider 配置:网络上存在重复名称
我正在尝试使 AD MembershipProvider 正常工作,但收到一个非常奇怪的错误:
“解析器错误消息:您未连接,因为网络上存在重复的名称。转到控制面板中的系统更改计算机名称,然后尝试再次。”
有人见过这个吗? 显然,我的办公室里没有其他主机名冲突的计算机(此外,我尝试将计算机重命名为模糊的名称)。
这是我的代码:
login.aspx: 请登录: 欢迎
默认.aspx 你好世界!
网络配置
<membership defaultProvider="AspNetActiveDirectoryMembershipProvider">
<providers>
<add name="AspNetActiveDirectoryMembershipProvider" type="System.Web.Security.ActiveDirectoryMembershipProvider"
connectionUsername="domain\useraccount"
connectionPassword="password"
attributeMapUsername="sAMAccountName"
connectionStringName="ADService"></add>
</providers>
</membership>
<authentication mode="Forms">
<forms loginUrl="login.aspx"
protection="All"
timeout="30"
name="miBenefitsAdminToolCookie"
path="/"
requireSSL="false"
slidingExpiration="true"
defaultUrl="Default.aspx"
cookieless="UseCookies"
enableCrossAppRedirects="false"/>
</authentication>
<authorization>
<deny users="?" />
<allow users="*" />
</authorization>
我做错了什么吗???
I am trying to put a AD MembershipProvider to work but I am getting a very strange error:
"Parser Error Message: You were not connected because a duplicate name exists on the network. Go to System in Control Panel to change the computer name and try again."
Has anyone seen this? Obviously there are no other computers with clashing hostnames in my office (besides, I have tried renaming the pc to obscure names).
Here is my code:
login.aspx:
Please log in:
Welcome
default.aspx
Hello world!
web.config
<membership defaultProvider="AspNetActiveDirectoryMembershipProvider">
<providers>
<add name="AspNetActiveDirectoryMembershipProvider" type="System.Web.Security.ActiveDirectoryMembershipProvider"
connectionUsername="domain\useraccount"
connectionPassword="password"
attributeMapUsername="sAMAccountName"
connectionStringName="ADService"></add>
</providers>
</membership>
<authentication mode="Forms">
<forms loginUrl="login.aspx"
protection="All"
timeout="30"
name="miBenefitsAdminToolCookie"
path="/"
requireSSL="false"
slidingExpiration="true"
defaultUrl="Default.aspx"
cookieless="UseCookies"
enableCrossAppRedirects="false"/>
</authentication>
<authorization>
<deny users="?" />
<allow users="*" />
</authorization>
Am I doing anything wrong???
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我遇到了同样的神秘错误,但这并不是因为“会员”配置。 相反,连接字符串中的 ldap 路径有问题,因为我被指向我们的 AD 全局目录 (globalcatalogue.mydomain.local)。 一旦我将其修剪为“mydomain.local”,它就可以正常工作。 也许它可能是连接字符串中的 LDAP 路径?
I experienced the same cryptic error, but it wasn't because of the "membership" configuration. Instead, the ldap path in the connection string was at fault since I was pointed at our AD global catalogue (globalcatalogue.mydomain.local). Once I trimmed this down to just "mydomain.local" it worked fine. Perhaps it could be your LDAP path in your connection string?
我在完全不同的场景中遇到了相同的错误(尝试通过 UNC 路径访问共享点计算机)。 以下注册表更改解决了我的问题,希望它也能解决您的问题。
将以下注册表更改应用到共享点服务器。 为此:
启动注册表编辑器 (Regedt32.exe)。
在注册表中找到并单击以下项:
HKLM\System\CurrentControlSet\Services\LanmanServer\Parameters
在“编辑”菜单上,单击“添加值”,然后添加以下注册表值:“
退出注册表编辑器”。
重启你的电脑。
I was getting the same error in a totally different scenario (trying to access the sharepoint machine via a UNC path). The following registry change fixed my issue, hopefully it fixes yours too.
Apply the following registry change to the sharepoint server. To do so:
Start Registry Editor (Regedt32.exe).
Locate and click the following key in the registry:
HKLM\System\CurrentControlSet\Services\LanmanServer\Parameters
On the Edit menu, click Add Value, and then add the following registry value:
Quit Registry Editor.
Restart your computer.