In this article I will explain how to install asp.net Membership database schema in Sql Server.
Description:
In one of my project I got requirement like using asp.net membership concept with custom database. First of all we learn what is asp.net 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 Asp.net 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![]() |
![]() |
![]() |
![]() |
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:CreateUserWizard ID="CreateUserWizard1" runat="server">
<WizardSteps>
<asp:CreateUserWizardStep ID="CreateUserWizardStep1" runat="server">
</asp:CreateUserWizardStep>
<asp:CompleteWizardStep ID="CompleteWizardStep1" runat="server">
</asp:CompleteWizardStep>
</WizardSteps>
</asp:CreateUserWizard>
</div>
</form>
</body>
</html>
|
<connectionStrings>
<add name="Connection" connectionString="Data Source=SureshDasari;Integrated Security=true;Initial Catalog=AspMembership" providerName="System.Data.SqlClient"/>
</connectionStrings>
|
<membership>
<providers>
<clear/>
<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="Connection" applicationName="SampleApplication"/>
</providers>
</membership>
<profile>
<providers>
<clear/>
<add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="Connection" applicationName="SampleApplication"/>
</providers>
</profile>
<roleManager enabled="false">
<providers>
<clear/>
<add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="Connection" applicationName="SampleApplication"/>
</providers>
</roleManager>
|
|
If you enjoyed this post, please support the blog below. It's FREE! Get the latest Asp.net, C#.net, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email. |
|||
Subscribe by RSS
Subscribe by Email
|
|||
|
|






Subscribe by RSS
Subscribe by Email
12 comments :
Thank you! You have NO idea how many help sites I've browsed to find this info!
Thank you.
Good information. Thank you
unable to connnect sql server... :(
Getting this error on submit
Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion
thnks...
hello sir,
it gives error while creating database.
Unable to connect to SQL Server database.
I tried it by creating database in sqlserver..it gives sign up page.. After clicking on create user it gives Server Error in '/Membership_Login' Application..Instance failure..
please help me..
thank you..
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...
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
thanks
i want information on webservices and wcf