Click here to Skip to main content
15,914,111 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a database with the name College
In that Principle and Lectures and Students are the users that means we have three levels of authentication
i used aspner_reqsql for member roles and rules
that means i attached my roles and rulle to College database
but when i click on asp.net Configuration
(at Solution Explorer) it creates new database with the name aspnetdb and when i creates new users those will be stored on that database how to use my own database instead of aspnetdb
Posted
Updated 15-Aug-11 22:47pm
v2

1 solution

Hi,

First you take the script of the created db and run that script into your database and update your membership section in the web.config file.

HTML
	<membership defaultprovider="SQLMembershipProvider" userisonlinetimewindow="15">
			<providers>
				<clear />
				<add name="SQLMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionstringname="PMSoftDb" applicationname="Port80Upload" enablepasswordretrieval="false" enablepasswordreset="true" passwordstrengthregularexpression="([a-zA-Z])(?=.*\d)\w{4,9}$" requiresquestionandanswer="false" requiresuniqueemail="true" minrequiredpasswordlength="6" minrequirednonalphanumericcharacters="0" passwordformat="Hashed" />
			</providers>
		</membership>
<profile enabled="true" defaultprovider="SQLProfileProvider">
  <providers>
	<add name="SQLProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionstringname="PMDb" applicationname="Port80Upload" />
 </providers>
</profile>

Also you should set connection string in the web.config
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900