Form Based Authentication in SharePoint

This post serves me as a list of items to do when configuring FBA from scratch in SharePoint. It is by no means self explanatory or exhaustive.

1. Create a new web application call it Intranet, extend it and call that Extranet. Extranet is to live in Extranet zone.

2. Run “aspnet_regsql.exe -E -A all -S DatabaseServerName”

image

3. Create web application proj in VS to add users via Website ASP.NET Web Configuration. In web.config of this web app set authentication mode = “Forms”, and add connection string setting to the database created in step 2.

4. In Extranet and central admin web.config

Add the following two blocks of configuration settings.

<system.web>
 
  <!-- membership provider -->
  <membership defaultProvider="AspnetSqlMembershipProvider">
    <providers>
      <remove name="AspnetSqlMembershipProvider" />
      <add name="AspnetSqlMembershipProvider"
           type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
           passwordStrengthRegularExpression=""
           connectionStringName="SqlProviderConnection"
           passwordAttemptWindow="10"
           enablePasswordRetrieval="false"
           enablePasswordReset="true"
           requiresQuestionAndAnswer="false"
           applicationName="/"
           requiresUniqueEmail="false"
           passwordFormat="Hashed"
           minRequiredPasswordLength="3"
           minRequiredNonalphanumericCharacters="0"
           />
    </providers>
  </membership>
 
  <!-- role provider -->
  <roleManager enabled="true" defaultProvider="AspnetSqlRoleProvider">
    <providers>
      <remove name="AspnetSqlRoleProvider"/>
      <add name="AspnetSqlRoleProvider"
           connectionStringName="SqlProviderConnection"
           applicationName="/"
           type="System.Web.Security.SqlRoleProvider,System.Web,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a"
           />
    </providers>
  </roleManager>
 
  <!-- other settings -->
 
</system.web>
<configuration>
<connectionStrings>
  <add name="SqlProviderConnection" connectionString="Data Source=VM-WSSDEV;Initial Catalog=AspNetDb_FBASpike;Integrated Security=True" />
</connectionStrings>
</configuration>

5. In central Admin

image

6. Add app pool identity user to sql server  assign dbo role to the database created in 2.

image

7. Add users created in step 3 to Site Collection Admin

image

8. Download and deploy FBA Tools and Utils for SharePoint 2007 to manage users, roles within SharePoint.

Advertisements

One response to this post.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: