Custom membership rolemanager provider
1. Use aspnet_regsql.exe (default location: C: \ WINDOWS \ Microsoft. NET \ framework \ v2.0.50727 \ aspnet_regsql.exe) to create the required database
2. modify web. config
<Configuration xmlns = "http://schemas.microsoft.com/.NetConfiguration/v2.0">
<Connectionstrings>
<Add name = "yourconnection" connectionstring = "Data Source = yourdatasource; initial catalog = yourcatalog; user id = yourid; Password = yourpassword"/>
</Connectionstrings>
<System. Web>
<Authentication mode = "forms"/>
<Rolemanager enabled = "true" defaultprovider = "yourrolemanager">
<Providers>
<Add name = "yourrolemanager" type = "system. Web. Security. sqlroleprovider" connectionstringname = "yourconnection" applicationname = "yourapplication"/>
</Providers>
</Rolemanager>
<Membership defaultprovider = "yourmembership">
<Providers>
<Clear/> // clear the default providers
<Add name = "yourmembership" type = "system. web. security. sqlmembershipprovider "connectionstringname =" yourconnection "applicationname =" yourapplication "Success =" false "enablepasswordreset =" true "Success =" true "requiresuniqueemail =" true "passwordformat =" hashed "/>
</Providers>
</Membership>
</System. Web>
<Configuration>