views:

127

answers:

6
+1  Q: 

.NET Membership

Hi I am trying out the membership features for .NET and I am using the ASP.NET Web application Administration Tool. My question is where is the user data being stored? I checked my databases and I cannot find it anywhere. I also tried to look for any information within Providers in the admin tool but I still could not locate a path. Can someone help me out? Thanks.

[EDIT] Nothing is in the App_Data folder.

Also I was wondering when I right click App_Data and try to add a database, there is no option to do so. (Add New Item).

+1  A: 

I think, it would create a database by name aspnet by default.

Check it :)

novice
There is no such db on my server.
Oliver S
can u share ur Webconfig related to Membership ???
novice
A: 

have u run aspnet_regsql.exe?

Tim Almond
+1  A: 

Look for a file called ASPNETDB.MDF in the App_Data folder of your web application project. That's a SQL Express database file.

Edit: Try looking in the App_Data folder in Windows Explorer. It may be on the disk but not showing up in the project inside of Visual Studio.

http://aspnet.4guysfromrolla.com/articles/120705-1.aspx

Greg
You are correct. Is there a way I can get this as a table on my SQL server? Do I attach the db?
Oliver S
Do you know why it doesnt show up inside the project?
Oliver S
Probably because the admin tool created the file but didn't add it to the project. You can add it to the project by right-clicking on the the App_Data directory and choosing Add > Existing Item.
Greg
Adding the tables to your database server is fairly simple, but involves a lot of little steps. I'd suggest following the instructions found here: http://aspnet.4guysfromrolla.com/articles/040506-1.aspx
Greg
A: 

Check your web.config for the connection string to the database. If it's sql server then there will be a bunch of tables prefixed with 'aspnet_' or something very similar.

maxp
+1  A: 

It's saved in a database file under your ASP.NET application's App_Data folder.

You can configure it by aspnet_regsql.exe tool to include in your sql server instance :

aspnet_regsql.exe -E -S localhost -A mr
Canavar
A: 

If you need to create the tables and stored procedures for the membership/ roles provider you can open a Visual Studio command prompt (check your start menu) and run aspnet_regsql. The exe is also under the %WINDOWSDIR%\Microsoft.NET\Framework\v2.0.50727\ directory.

It'll enable you to select a database from a running of Server and create everything you need to be getting on with.

Kieron