R – (ASP.NET Membership) How to add a new property to aspnet_Profile

asp.netasp.net-membership

So I need to add two new properties to the Profile object for asp.net membership.

I added these two items to the properties tag in web.config.

<group name="Terms">
  <add name="Promotions" type="Bool" serializeAs="String" />
  <add name="AcceptedTerms" type="Bool" serializeAs="string" />
</group>

In my code behind I am able to do Profile.Terms.Promotions and call Profile.Save() with no exceptions.

However, the aspnet_Profile table does not seem to have the updated properties.

Do I need to run something on the actual database, like an update script of some sort?

Thanks in advance!

Edit by Jack:

So I found out it's an issue with my development database server. For some reason Profile info is not saving properly. So this is a whole other issue ha

Best Answer

Membership profile uses it's own method of generating a serialized profile object that represents the properties you require. On objects that have already been created in the database the new properties might not be present until they have been re-saved.