Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Active Directory Users
smallmankh
#1 Posted : Thursday, 29 July 2010 2:50:06 PM(UTC)
Rank: Member

Joined: 29/07/2010(UTC)
Posts: 5
Location: Cambodia

Dear all,

My gallery Server, now working the Active Directory but I need to change something a little bit.
when the user log in, the default format is: username@domainName
what I want to change is the user log in by : username only
username@domainName-->username

Thanks
Roger Martin
#2 Posted : Friday, 30 July 2010 1:14:54 AM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

From the Admin Guide section on Active Directory:

Log on with simple username instead of fully qualified name

Your users might prefer logging on with just the user name rather than the fully qualified name. That is, instead of typing Roger@mydomain.techinfosystems.com, you enter Roger. To enable this feature, add the attributeMapUsername to the membership configuration:

Code:
<membership defaultProvider="AspNetActiveDirectoryMembershipProvider">
<providers>
<add name="AspNetActiveDirectoryMembershipProvider" type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="ADConnection" enableSearchMethods="true" attributeMapUsername="sAMAccountName" />
</providers>
</membership>


By setting attributeMapUsername to sAMAccountName, you can log on with just the username, such as Roger in the previous example.
Roger Martin
Creator and Lead Developer of Gallery Server Pro
smallmankh
#3 Posted : Friday, 30 July 2010 12:11:33 PM(UTC)
Rank: Member

Joined: 29/07/2010(UTC)
Posts: 5
Location: Cambodia

When I added your code to the web.config, I got the following error.

Parser Error Message: The entry 'AspNetActiveDirectoryMembershipProvider' has already been added.

Here is what I added:

Code:
<membership defaultProvider="AspNetActiveDirectoryMembershipProvider">
         <providers>
             <add name="AspNetActiveDirectoryMembershipProvider" type="System.Web.Security.ActiveDirectoryMembershipProvider,System.Web, Version=2.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="ADConnection" enableSearchMethods="true" connectionUsername="administrator@domain" connectionPassword="xxxxxxx" attributeMapUsername="sAMAccountName"/>            
         </providers>
     </membership>


What should I do Roger?
Roger Martin
#4 Posted : Friday, 30 July 2010 12:51:10 PM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

Don't add the whole section, just add the attributeMapUsername attribute. Re-read my instructions carefully.
Roger Martin
Creator and Lead Developer of Gallery Server Pro
smallmankh
#5 Posted : Friday, 30 July 2010 12:58:30 PM(UTC)
Rank: Member

Joined: 29/07/2010(UTC)
Posts: 5
Location: Cambodia

Yes I just edit under my membership.
i just add attributeMapUsername="sAMAccountName"

Any place that I should to add?
Roger Martin
#6 Posted : Friday, 30 July 2010 2:03:08 PM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

I don't understand your question.
Roger Martin
Creator and Lead Developer of Gallery Server Pro
smallmankh
#7 Posted : Friday, 30 July 2010 2:11:56 PM(UTC)
Rank: Member

Joined: 29/07/2010(UTC)
Posts: 5
Location: Cambodia

now my user is working with user in AD with the Gallery Server.
But I don't want the user type: username@domainname will they log in
just want them access with username in AD only.

But when i try to add code as you told me, it still doesn't work.
Roger Martin
#8 Posted : Saturday, 31 July 2010 2:02:47 AM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

Not sure why that doesn't work for you. It works for me. But I admit I am not much of an AD expert. I suggest you google sAMAccountName and membership to see if you can find others with your issue. This is an AD issue, not a GSP one.
Roger Martin
Creator and Lead Developer of Gallery Server Pro
Rss Feed  Atom Feed
Users browsing this topic
Guest
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.