Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Feb 22, 2008 03:31 AM by Lee Dumond
Feb 21, 2008 10:43 AM|LINK
I currently am using website with the Beerhouseproject. Now because of the aspnet_Profile table, my database size has gone huge.
1. Can I do a truncate on the aspnet_Profile table.
2. Can i eliminate aspnet_Profile from my website altogether.
thanks. plz help fast
Feb 21, 2008 11:06 AM|LINK
What are you using Profiles for? You could truncate the table but then you won't be able to access the details you have stored in Profile. If you eliminate profile, how would you show the information saved in those tables.
Feb 21, 2008 11:20 AM|LINK
I do not know where is the profiles used. Surprisingly it is taking up 140 MB of my total db space (250 MB)
If i truncate profiles, how will the application be affected?
thanks for the help
Feb 21, 2008 12:02 PM|LINK
If you open your application and click on Edit --> Find and Replace --> Find in Files and search for Profile in the Entire Solution, it would tell you where it's used. If it's used anywhere, Truncating Profiles table wouldn't be a good idea then (unless
you don't need the information in Profiles Table).
Feb 21, 2008 12:37 PM|LINK
Do you have any idea what is the Profiles table used for. I mean if i truncate that, will it delete the users? or the users wont be able to login?
Feb 21, 2008 12:41 PM|LINK
Feb 21, 2008 12:56 PM|LINK
thanks for the link. However i did not mean to understand profiling.
I just want to know if anyone has used Beerhouse kit and knows if truncating the profile table will make any difference to the users logging in. I am ok if there preferences like themes etc. are lost. However they should be able to log in atleast with their
Feb 21, 2008 01:00 PM|LINK
The whole point for that link was so that you check your web.config file and check what's in the profile. Profile is a generic table, so until you check web.config, you wouldn't know what's being used as columns in the profile table.
Feb 21, 2008 02:04 PM|LINK
Here's the entry in web.config
Feb 21, 2008 02:14 PM|LINK
In the BeerHouse project, Profiles hold ALL the information about a user except for their username and password (which is handled by the membership system) and the roles they belong to (which is handled by the roles provider). The membership system handles
logins, so, to answer your question, your users would still be able to login without them.
Profiles are also vital to how the eCommerce store works, because as written, the store uses them to persist the ShoppingCart. This also allows anonymous users to build a shopping cart without creating an account or logging in first. The Shopping Cart is
cleared once an order is placed, so that shouldn't make a big difference.
Besides the Shopping cart, the Profile holds mostly short strings, except for one enumeration, one integer, and one DateTime value. The main reason the Profile system would grow is that you have a lot of users... and that's a good thing, right? [;)]
One way to make the Profile smaller is to tailor the custom TBH_ProfileProvider to not include fields you're not using in your application. For example, if you don't have a forum, you can get rid of the Posts, AvatarUrl, and Signature fields.
Another way would be to better handle anonymous profiling, which is used in the Theme selection and, as mentioned, in the ShoppingCart. The way the application handles these is to migrate the anonymous Profile to an authenticated Profile once an anonymous
user creates an account and logs in. If, however, you have a lot of anonymous users creating ShoppingCarts and choosing Theme Preferences, but never logging in afterward, your DB can become clogged with a lot of abandoned anonymous Profiles. You can either
simply not support anonymous profiles, or write a maintenance routine that finds and deletes them after a certain amount of time.
If you don't need to store any information at all about users and you're not using the eCommerce module or the Forum, you could eliminate the Profile system altogether. The eCommerce and Forum modules could be made to work without profiles (as in the first
edition of the book) but plan to do a lot of extra work to store/retrieve the needed data in the DB instead.
Hope this helps.