views:

428

answers:

1

Hi- I'm wanting to create a user account creation section for unregistered users on our internet site. I want to ask the same questions as the CreateUserWizard control but have a few changes. I want the question to come from a question lookup table in SQL. The user will have a dropdown of available questions and I'll store the questionid they selected and the answer. Also, I want to store 1 other piece of data about the user (SSN).

My questions are: 1) Is forms based authentication an acceptable solution for this if using SSL? 2) Can I add additional columns (questionid and ssn) to the membership table or another table and how do I do that so I can save the info in the 'blessed' way? Will the solution have any negative effect if down the road I want to add password reset/recovery?

When adding columns, does it make sense to invoke Membership.CreateUser rather than using the CreateUserWizard?

Thanks!!

A: 

1) Yes it is. You can extend Membership with Profiles, and add any arbitrary fields you like

2) You can customize the CreateUserWizard a great deal, but behind the scenes it just ends up calling Membership.Create user. Personally, I would just roll my own (since it really isn't all that hard) unless you want to use the default wizard. But that is more personal preference then anything else.

NOTE: the link I provided for Profiles assumes you are using a WebSite project. If you are using Web Application projects, there are a few additional steps you can read about here.

Matt Briggs
If I roll my own, what considerations should I consider to keep the site secure? I was considering doing everything using SSL and using simple SQL lookups in the code behind to verify authentication. Sound OK? Anything else to consider?
asp316
Password hashing. Login persistence (use a cookie? jam it in the session?). Audit logging. Enabling/Disabling/Deleting of users. It depends what you are making (if it is for comments on a blog, not a big deal. Bank software, very big deal) and what your requirements are.
Matt Briggs