views:

436

answers:

1

Hi all,

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???

A: 

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:

Value name: DisableStrictNameChecking
Data type: REG_DWORD 
Radix: Decimal
Value: 1

Quit Registry Editor.

Restart your computer.

Andrew Strong