I am using the create user wizard of C# asp.net 4. I want to change its default database (i.e. ASPNETDB.mdf) to my own created database (i.e. test.mdf).
How can I do this? and one more thing.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
2 step required .
First need to run
aspnet_regsql.exetool which is located in[YouWinDrive]:\Windows\Microsoft.NET\Framework\v2.0.50727and in this wizard while you target your arbitrary database create necessary objects .Step2 : you need to config your asp.net membership provider . as you may know web.config file inherites from Machine.config file which is locatd in
[YouWinDrive]:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIGif you look at that file you will find out Default AspNetSqlMembershipProvider is targeted in sqlserver express and aspnetDB :
So you need to override this membership in your web.config file like this :
and you can change it as you would like .