This project has moved and is read-only. For the latest updates, please go here.

Custom ASP.NET DB memebership fields

Mar 24, 2014 at 4:21 PM
I added some custom columns in the aspnet_Membership table, and I am wondering how to access those new fields from the FBA tool source code, where I need to add custom logic to the SharePoint behavior. So the problem is how to connect to the database from the tool and manipulate those fields. Any help will be highly appreciated.

Mar 24, 2014 at 5:18 PM
Everything is managed through the membership provider - so the FBA Pack doesn't actually do any direct access to the database. I suggest you take a look at profile providers - which essentially adds columns for each user, but through a provider:

Alternatively, if this is all internal, you can use standard .net methods to query/update the database (Not best practices, but it will work).

Myself, when I need extra fields, I usually add it to the SharePoint user's profile - so I update SharePoint, not the membership database.
Mar 24, 2014 at 5:30 PM
Thanks for the quick response! If I decide to use the profile providers, how can do it in the FBA tool? Sorry if the question is lame, I am new to SharePoint development and FBA tool.

Mar 24, 2014 at 8:41 PM
I'm guessing this is how it is done (I've never used the profile provider myself - I store everything in the SharePoint user's profile):
Mar 28, 2014 at 3:17 PM
I`ve found a way to use custom membership fields.

Thanks a lot for your help :)
Mar 28, 2014 at 3:38 PM
Great! Which way did you end up going? Profile provider? SharePoint Profile? Direct DB Access?
Mar 28, 2014 at 3:56 PM
Direct DB Access :)

Profile Provider took us in a lot of troubles, but direct DB access did the job.