Using the SitefinityMembershipProvider
Hello,
I am looking for some documentation on how to setup the SitefinityMembershipProvider. We have several asp.net applications (currently using Asp.Net Membership Provider) that are integrated into our public website and now that we are using Sitefinity for the public web site, we want to unify them with a single sign on system.
I can't seem to find the setup instructions on how to add the SitefinityMembershipProvider to my asp.net application. Through trial and error I have figured out how to modify the web.config to point to the SitefinityMembershipProvider. I have also added Sitefinity as a connection string to my connection string section. I also added a the SEcurityConfig.config file to the Apps/Sitefinity/Configuration section.
Is there another file that I am missing?
Thanks,
Pierre
Hello Pierre Chew,
Here are some detailed instructions on how to add a membership provider:
1. Create a database that will hold the membership users using aspnet_regsql.exe or use and existing one
2. Add a connection string to the web.config file that points to this database
3. Add the following settings to the web.config file to indicate you want to use additional ASP.NET membership and/or role providers:
<
system.web
>
<
connectionStrings
>
<
add
name
=
"SqlMembership"
connectionString
=
"data source=localhost;UID=sa;PWD=password;initial catalog=Membership"
providerName
=
"System.Data.SqlClient"
/>
</
connectionStrings
>
<
roleManager
enabled
=
"true"
>
<
providers
>
<
clear
/>
<
add
name
=
"AspNetSqlRoleProvider"
connectionStringName
=
"SqlMembership"
applicationName
=
"/"
type
=
"System.Web.Security.SqlRoleProvider"
/>
</
providers
>
</
roleManager
>
<
membership
>
<
providers
>
<
clear
/>
<
add
connectionStringName
=
"SqlMembership"
enablePasswordRetrieval
=
"false"
enablePasswordReset
=
"true"
requiresQuestionAndAnswer
=
"false"
requiresUniqueEmail
=
"false"
maxInvalidPasswordAttempts
=
"5"
minRequiredPasswordLength
=
"6"
minRequiredNonalphanumericCharacters
=
"0"
passwordAttemptWindow
=
"10"
applicationName
=
"/"
name
=
"AspNetSqlMembershipProvider"
type
=
"System.Web.Security.SqlMembershipProvider"
/>
</
providers
>
</
membership
>
...
Here in the <
membership
><
providers
><
add
> element the connectionStringName is the connection string you added in step 2
4. The membership provider in the <
membership
> element should appear in a dropdown list on the backend login page allowing you to select it to login to the backend