Thursday, July 29, 2010

Membership setup and configuration issue

To implement Membeship API to an ASP.NET application (Framework 2.0/3.0/3.5), create the Web site in VS 2005/2008 and then click on "Website=>ASP.NET Configuration" and start the process.

If using a remote DB then need to put some settings into the Web.config before starting this wizard:

1) Add a connection string in the web.config:





2) Next, change the authentication mode to Forms:


3) For Roles add this settings:



type="System.Web.Security.SqlRoleProvider"/>




4) Add Providers details under section




type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="MyAspnetDB"
enablePasswordRetrieval="false"
enablePasswordReset="true"
requiresQuestionAndAnswer="true"
applicationName="MyApplicationName"
requiresUniqueEmail="true"
passwordFormat="Hashed"
maxInvalidPasswordAttempts="5"
minRequiredPasswordLength="7"
minRequiredNonalphanumericCharacters="1"
passwordAttemptWindow="10"
passwordStrengthRegularExpression="" />



Once all these settings are in place, fire up the ASP.NET configuration tool and it will work perfectly.

http://bytes.com/topic/asp-net/answers/594723-error-provider-management-could-not-establish-connection-database

http://forums.asp.net/p/978442/1364770.aspx

No comments:

Post a Comment