Here is Part 1

In this article we will be seeing how to configure forms based authentication for claims based web application using SQL provider.

Creating the database:

Adding users to the SQL database using Web Site Administration Tool:

<configuration>

<system.web>

<membership defaultProvider="AspNetSqlMembershipProvider">

<providers>

<clear />

<add name="AspNetSqlMembershipProvider"

connectionStringName="AspNetSqlProvider"

applicationName="/"

type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

</providers>

</membership>

<roleManager enabled="true">

<providers>

<clear />

<add connectionStringName="AspNetSqlProvider" applicationName="/"

description="Stores and retrieves roles data from the local Microsoft SQL Server database"

name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider, System.Web,Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

</providers>

</roleManager>

</system.web>

<connectionStrings>

<clear/>

<add name="AspNetSqlProvider"

connectionString="data source=.; Integrated Security=SSPI;Initial Catalog=aspnetdb;"

providerName="System.Data.SqlClient" />

</connectionStrings>

</configuration>




Create a claim based web application:
Configure the web.config files:
Central Administration Web application web.config file:
Forms-based authentication claims-based Web application Web.Config file:
Security Token Service web.config file:
Policy for Forms-based authentication claims-based Web application:
Testing: