p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   ASP.NET 3.5 Basics (http://p2p.wrox.com/forumdisplay.php?f=351)
-   -   Question about Asp.net Membership (http://p2p.wrox.com/showthread.php?t=73682)

chobo2 March 31st, 2009 09:56 PM

Question about Asp.net Membership
 
Hi
I have a couple questions about asp.net membership.
First how does the asp.net configuration. Like where does it store the information? Like I created a user(and gave a role to it) in there and now I launched my site and I noticed when I went and registered the same user name it had the same role that was given to the one in the asp.net configuration.
So I made another user through the registration(not the asp.net configuration) and it did not have this role(what is a good thing). But I don't understand how it remembered that user and the role. Like I looked through the mssql tables and there is nothing about the role I made in the asp.net role table and before I registered there where no users in the "users" table.
So this has lead me to believe this stuff is stored somewhere else. What seems kinda weird to me why they have all these tables but they(microsoft) don't use them.

Imar April 2nd, 2009 03:32 PM

Like, you know, the members and roles are stored in the database. Like, in the various aspnet_* tables. Like when you sign up for a user (like using the Login control) you get a record in, like, you know, aspnet_Users and in aspnet_Membership.

Like, maybe you are looking at the wrong database? Like you think you create them in one, but they end up in the App_Data folder of your website?

Like, all in all, the data for the Membership services *is* stored in the aspnetdb.mdf database by default (located in App_Data). Like, however, it's possible to change this location. Like this means you should find Users, Roles, Profile, Personalization and more in the database for your application.

Like which database did you check?

Like cheers,

Imar

(Like, sorry, I couldn't resist)

chobo2 April 2nd, 2009 03:58 PM

Quote:

Originally Posted by Imar (Post 238652)
Like, you know, the members and roles are stored in the database. Like, in the various aspnet_* tables. Like when you sign up for a user (like using the Login control) you get a record in, like, you know, aspnet_Users and in aspnet_Membership.

Like, maybe you are looking at the wrong database? Like you think you create them in one, but they end up in the App_Data folder of your website?

Like, all in all, the data for the Membership services *is* stored in the aspnetdb.mdf database by default (located in App_Data). Like, however, it's possible to change this location. Like this means you should find Users, Roles, Profile, Personalization and more in the database for your application.

Like which database did you check?

Like cheers,

Imar

(Like, sorry, I couldn't resist)

Ya this is what happened I did not set up a custom role provider so roles where being generated in the default aspnetdb and the other stuff was being generated in my customer table.

Imar April 2nd, 2009 04:02 PM

Right; that indeed explains it. Funny auto database generation.... ;-)

Imar


All times are GMT -4. The time now is 05:44 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.