FBA Configuration Manager for SharePoint 2010

Setting up forms based authentication in SharePoint 2010 requires making changes in three web.config files.

This utility allows you to perform the update in a single click and was inspired by the configuration manager that Steve Peschka released.

I’ve taken a different approach to Steve’s, instead of using a feature and a timer job I directly update the config files in the local machine. To update the other machines in the farm you can use the included PowerShell script.

The utility makes a back-up of all of the web.configs before updating them. I’ve also included the sample membership and role providers that Steve provided.

The PowerShell script to perform the update uses the same engine as the UI.


function global:Get-ScriptDirectory()
{
$Invocation = (Get-Variable MyInvocation -Scope 1).Value
Split-Path $Invocation.MyCommand.Path
}

$webApp = Get-SPWebApplication http://localhost:9191
$settingsPath = Join-Path (Get-ScriptDirectory) "SqlMembershipConfig.xml"
$settings = Get-Content $settingsPath
$scriptDir = Get-ScriptDirectory
$assemblyPath = Join-Path $scriptDir "FBA.dll"
Add-Type -Path $assemblyPath
[FBA.ConfigureMembershipProvider]::Configure($webApp, "Default", $settings)

The source code and release packages are available in CodePlex: http://fbaconfigmanager.codeplex.com/

FBA Configuration Manager for SharePoint 2010
  • Radi A.

    Well done Merill! Thanks for creating this, I will think of it next time I do something FBA related.

  • Mark

    Are you sure that script is correct? There is no definition for $scriptDir ?

  • Mark

    $scriptDir = Get-ScriptDirectory

    is required before the $assemblyPath line

  • Thanks Mark. Your right $scriptDir needed to be initialised

  • I try this script, it’s work , thanks 😉

  • KevinW

    Merrill … I’m trying to use your utility, but have questions, which I have posted to the CodePlex site. Appreciate any help …

  • Utility is well displayed by the sample that made me to use it in a bit easy manner.

  • Jason

    Nice kit great work

  • Paisley

    Hi Merril – does this work for sharepoint 2013? It looks really great so I hope so!