Membership Provider Setup

In order to set up your application to use Microsoft’s Membership Provider you need to do the following.

1. Set up your database by installing the Membership schema. This is done by locating the aspnet_regsql.exe utility found in the C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 directory. Run it using the -W flag (aspnet_regsql -W) and walk through the wizard that you are presented with.

2. Add a connection string to your web.config which points to the database you just installed the Memberhsip schema in.

<add name="LocalSqlServer"
providerName="System.Data.SqlClient" />

3. Then you need to add the membership provider to the web.config as follows

<add connectionStringName="LocalSqlServer" name="AspNetSqlMembershipProvider"
enablePasswordRetrieval="false" enablePasswordReset="true"
applicationName="/" requiresUniqueEmail="false" passwordFormat="Hashed"
maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6"
minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10"
passwordStrengthRegularExpression="" requiresQuestionAndAnswer="true"
type="System.Web.Security.SqlMembershipProvider, System.Web, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

4. Thats it, your done!

Published by

Tim Clark

Experienced Business Owner, Chief Information Officer, Vice President, Chief Software Architect, Application Architect, Project Manager, Software Developer, Senior Web Developer, Graphic Designer & 3D Modeler, University Instructor, University Program Chair, Academic Director. Specialties: Ruby, Ruby on Rails, JavaScript, JQuery, AJAX, Node.js, React.js, Angular.js, MySQL, PostgreSQL, MongoDB, SQL Server, Responsive Design, HTML5, XHTML, CSS3, C#,, Project Management, System Design/Architecture, Web Design, Web Development, Adobe CS6 (Photoshop, Illustrator)

One thought on “ Membership Provider Setup

  1. Nice and concise 😉 I've slogged through some of the tutorials on and you have captured the essential. A good time saver!


Leave a Reply to ActiveEngine Sensei Cancel reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s