Here's what alot of people have been waiting for, using Forms authentication to login against your company's Active Directory.
Its been tested against CS 2.1, but i believe there should be no problems using it in CS 2.0.
Note that this works only if you are using .NET 2.0 Membership provider, it does not work in .NET 1.x
1. Download the zip file (
http://moduleblog.nus.edu.sg/Jeffery.FormsADMemberRole.zip) and extract the dll to Community Server web/bin folder.
2. Changes to be made to config files (those in bold)
Web.config
<authentication mode="Forms">
<forms name=".CommunityServer" protection="All" timeout="60000" loginUrl="login.aspx" slidingExpiration="true" />
</authentication>
<membership userIsOnlineTimeWindow="15" defaultProvider="CommunityServerSqlProvider" >
<providers>
<clear />
<add
name="CommunityServerSqlProvider"
type="Jeffery.FormsADMemberRole.CSMembershipProvider, Jeffery.FormsADMemberRole"
connectionStringName="SiteSqlServer"
enablePasswordRetrieval="false"
enablePasswordReset="true"
requiresQuestionAndAnswer="false"
requiresUniqueEmail="true"
passwordFormat="Hashed"
applicationName="dev"
description="Stores and retrieves membership data from the local Microsoft SQL Server database"
maxInvalidPasswordAttempts = "999"
passwordAttemptWindow = "999"
minRequiredPasswordLength = "6"
minRequiredNonalphanumericCharacters = "0"
/>
</providers>
</membership>
communityserver.config
change
<add
name = "MemberRoleProfileProvider"
type = "CommunityServer.ASPNet20MemberRole.CSMemberRoleProfileProvider, CommunityServer.ASPNet20MemberRole"
/>
to
<add
name = "MemberRoleProfileProvider"
type = "Jeffery.FormsADMemberRole.CSMemberRoleProfileProvider, Jeffery.FormsADMemberRole"
/>
inside <extensionModules>
add the following section
<add name="FormsADAuthentication"
extensionType="Security"
type="Telligent.CommunityServer.Security.FormsAuthentication, Telligent.CommunityServer.SecurityModules"
allowAutoUserRegistration="true"
userEmailAddressCookie="CSUserEmailAddress"
useEncryptedEmailAddressCookie="false"
adminWindowsGroup="Administrators"
adminWindowsGroupIsSystemAdministrator="true"
stripDomainName="true"
emailDomain="@nus.edu.sg"
Domains="stf.nus.edu.sg,stu.nus.edu.sg"
/>
I believe most of the fields are self-explainatory, please feedback if there's any errors or any suggestions, thanks!
Updates on 10 May 2007:
- Updated link as the server went down
- Source code provided, should work for CS 2.x series