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.
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).
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
username password
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.
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.
ronnieedin
Member
31 Points
111 Posts
aspnet_Profile table
Feb 21, 2008 10:43 AM|LINK
Hi,
I currently am using website with the Beerhouseproject. Now because of the aspnet_Profile table, my database size has gone huge.
My questions:
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
talha83
Participant
1242 Points
240 Posts
Re: aspnet_Profile table
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.
MCP, MCAD, MCPD
Personal Blog
ronnieedin
Member
31 Points
111 Posts
Re: aspnet_Profile table
Feb 21, 2008 11:20 AM|LINK
Hi,
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
talha83
Participant
1242 Points
240 Posts
Re: aspnet_Profile table
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).
MCP, MCAD, MCPD
Personal Blog
ronnieedin
Member
31 Points
111 Posts
Re: aspnet_Profile table
Feb 21, 2008 12:37 PM|LINK
Hi,
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?
thanks
talha83
Participant
1242 Points
240 Posts
Re: aspnet_Profile table
Feb 21, 2008 12:41 PM|LINK
MCP, MCAD, MCPD
Personal Blog
ronnieedin
Member
31 Points
111 Posts
Re: aspnet_Profile table
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 username password
thanks.
talha83
Participant
1242 Points
240 Posts
Re: aspnet_Profile table
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.
MCP, MCAD, MCPD
Personal Blog
ronnieedin
Member
31 Points
111 Posts
Re: aspnet_Profile table
Feb 21, 2008 02:04 PM|LINK
Hi,
Here's the entry in web.config
<profile defaultProvider="TBH_ProfileProvider"><
providers> <add name="TBH_ProfileProvider" connectionStringName="LocalSqlServer" applicationName="/" type="System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/></
providers> <properties><
add name="FirstName" type="String"/> <add name="LastName" type="String"/><
add name="Gender" type="String"/> <add name="BirthDate" type="DateTime"/><
add name="Occupation" type="String"/> <add name="Website" type="String"/><
add name="ShoppingCart" type="MB.TheBeerHouse.BLL.Store.ShoppingCart" serializeAs="Binary" allowAnonymous="true"/> <group name="Forum"><
add name="Posts" type="Int32"/> <add name="AvatarUrl" type="String"/><
add name="Signature" type="String"/> </group><
group name="Address"> <add name="Street" type="String"/><
add name="PostalCode" type="String"/> <add name="City" type="String"/><
add name="State" type="String"/> <add name="Country" type="String"/></
group> <group name="Contacts"><
add name="Phone" type="String"/> <add name="Fax" type="String"/></
group> <group name="Preferences"><
add name="Theme" type="String" allowAnonymous="true"/> <add name="Culture" type="String" defaultValue="en-US"/><
add name="Newsletter" type="MB.TheBeerHouse.BLL.Newsletters.SubscriptionType"/> </group></
properties></
profile>Lee Dumond
Contributor
6404 Points
1173 Posts
Re: aspnet_Profile table
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.
Follow Me on Twitter