Search code examples
asp.netsilverlightauthenticationwcf-ria-services

Best practice to store extra data for users in a SL business application + ASP.NET authentication scenario?


I'm about to write a Silverlight business application and I'm planning to use the ASP.NET built in authentication service (from what I read it's safe enough).

My problem is I already have a database with a Users table which has many more columns than the one in the ASP.NET DB.

What's the best practice, here?

Option 1: Add columns to the ASP.NET Users table.

Option 2: Only put in my Users table the columns which are not in the ASP.NET Users table.

Option 3: Use the Profile table from the ASP.NET DB to store my users' extra data.

Option 4: You name it. ;o)

I currently tend towards option 2 because I think altering the ASP.NET DB would restrict the use of this DB to this very application.

Thanks!


Solution

  • Option 2 is probably pretty good (you can override and customise the membership provider classes to make this a bit more seamless for you).

    The profile table is useful, as it is very easy to add to, but can be a real pain to query directly (e.g. creating a gridview showing the firstname and lastname of all your users, where this data is all in one column in the profile).