aspdotnet-suresh offers articles and tutorials,csharp dot net, articles and tutorials,VB.NET Articles,Gridview articles,code examples of 2.0 /3.5,AJAX,SQL Server Articles,examples of .net technologies

Create membership database schema in SQL Server | Create User using CreateUserWizard control in

Jan 23, 2011

 In this article I will explain how to install Membership database schema in Sql Server.


In one of my project I got requirement like using membership concept with custom database. First of all we learn what is membership? And why we need to use this one?

ASP.NET membership gives you a built-in way to validate and store user credentials. ASP.NET membership therefore helps you manage user authentication in your Web sites. You can use ASP.NET membership with ASP.NET Forms authentication or with the ASP.NET login controls to create a complete system for authenticating users.
By Using ASP.NET membership we can create new users and passwords and we can authenticate users who visit your site. You can authenticate users programmatically, or you can use the ASP.NET login controls to create a complete authentication system that requires little or no code and we can manage passwords, which includes creating, changing, and resetting them.

Now we will do the step by step process how to use Custom membership database.

1.    Go to the Start menu and open Run and enter %WINDIR%\Microsoft.Net\Framework\v2.0.50727\aspnet_regsql.exe and click ok it will open the SQL Server setup wizard like this 

We can get this in alternatively go to C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regsql.exe
After that click next you will get window like this
In this wizard we have two options
1.    Configure SQL Server for application Services
2.    Remove application services information from an existing database.
Now select first option Configure SQL Server for application services because first time we are creating database. If you want to delete already created database select second option
After selecting the first option click next now the window like this
After that enter your database server name and select database from existing list or give new name and click next you will see the window like this
After that click next button you now your aspnet membership database installation is completed and now that is ready to use with our application final window like this
Now check your database everything installed and ready to use in our application.
Everything is ready how to use that custom database in our application for that create one new web application and name it as Registration.aspx now drag and drop the one new control CreateUserWizard from Login Controls list that aspx page like this

<html xmlns="" >
<head runat="server">
<title>Untitled Page</title>
<form id="form1" runat="server">
<asp:CreateUserWizard ID="CreateUserWizard1" runat="server">
<asp:CreateUserWizardStep ID="CreateUserWizardStep1" runat="server">
<asp:CompleteWizardStep ID="CompleteWizardStep1" runat="server">
Now open Web.config file and write the following code
Write the connectionstring like this
<add name="Connection" connectionString="Data Source=SureshDasari;Integrated Security=true;Initial Catalog=AspMembership" providerName="System.Data.SqlClient"/>
After that write the following code in system.web section
<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="Connection" applicationName="SampleApplication"/>
<add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="Connection" applicationName="SampleApplication"/>
<roleManager enabled="false">
<add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="Connection" applicationName="SampleApplication"/>
After that run your application and create user by using CreateUserWizard
Here functionality of inserting the user details and everything will take care by CreatUserWizard no need to write any coding just set the database and set the conditions in web.config file that is enough. Now your program will work perfectly  


If you enjoyed this post, please support the blog below. It's FREE!

Get the latest,, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email.

subscribe by rss Subscribe by RSS subscribe by email Subscribe by Email


Rickard said...

Thank you! You have NO idea how many help sites I've browsed to find this info!

Anonymous said...

Thank you.

Anonymous said...

Good information. Thank you

Anonymous said...

unable to connnect sql server... :(

nadeem said...

Getting this error on submit
Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion

Anonymous said...


Anonymous said...
This comment has been removed by a blog administrator.
Anonymous said...

hello sir,
it gives error while creating database.
Unable to connect to SQL Server database.
I tried it by creating database in gives sign up page.. After clicking on create user it gives Server Error in '/Membership_Login' Application..Instance failure..
please help me..
thank you..

Anonymous said...

its working.. superb..!!
just,match the sqlserver name with sqlserver set up wizard window server name.. it should be the same..
so,u get connected to server and database gets created..
Thank you so much...

Anonymous said...

hi suresh sir
please give the clear explanation of the error
Couldnot find storedprocedure'dbo.aspnet_checkSchemaVersion'
i tried all ways but i'm not get the correct result. Please tell the correct way


Anonymous said...
This comment has been removed by a blog administrator.
Unknown said...

i want information on webservices and wcf

sachin Lande said...

sir , i want to save this user details and role in my other database in sqlserver , tables as User , roles etc what should i do..

please reply

Regards sachin
My emailid is

Anonymous said...

i did the above thing and it worked
but can you tell me how do i get details that i entered in create user wizard into my own database table which i created

Anonymous said...

Thank you. It worked !

Unknown said...

sir user can have same name in this world but membership takes different user name every time. What should do ?? please explain its urgent .

Anonymous said...

thnx bro.... its simple and easy.....

Anonymous said...

sir your way of coding is awesome

Anonymous said...

Thanks a lot:)

Anonymous said...

it really helpful for me.thank u sir

Give your Valuable Comments

Note: Only a member of this blog may post a comment.

© 2015 All Rights Reserved.
The content is copyrighted to Suresh Dasari and may not be reproduced on other websites without permission from the owner.