B.Sai Kishore
B.Sai Kishore

Reputation: 1

While providing security all the tables goes into the "aspnetdb" database

I am developing a small website which contains admin pages, moderator pages and user pages. I have provided the security using asp.net configuration and I followed all the six steps.

The problem is after providing the security all tables are saved in the aspnetdb database, but I want all these tables into my own database.

Does any know how to save all the tables into my own database? If possible, give me some examples with more explanation.

Note: I am using a client system and the database is presented in the server system.

Upvotes: 0

Views: 73

Answers (1)

Tim B James
Tim B James

Reputation: 20364

In your web.config, there should be a setting within the <connectionStrings> section. I think the default is maybe just ApplicationConnection

This will be pointing to a SQLServer Express database file, so you can update this to your own database connection.

Then if you look for the sections <membership defaultProvider="SqlProvider"> <roleManager enabled="true" defaultProvider="SqlProvider"> you will see a setting within each for connectionStringName this will be pointing to the connection string. Make sure that this is the same as the connection string which is pointing to your database.

You database is probably lacking the tables for the asp.net security, so you will want to look into generating these.

aspnet_regsql is what you want to look into. This auto generates all the tables needed, then the first time your application is running, it adds some details to the tables, e.g. application name, id, etc...

Upvotes: 1

Related Questions