views:

45

answers:

2

I have an existing ASP.NET web application that is for public use and any anonymous user can access it. I would like to implement mechanism for users to sign up. The first thought that crossed my mind is to use the ASP.NET membership API.

So, If I use the Membership API:

  1. Can I integrate it with an existing SQL express database? I would rather not have two separate databases
  2. Can I choose not to have GUIDs for User IDs?
  3. Can I install only the tables needed for Membership to work? I would not want to have tables for say WebParts as this website will never have WebParts.
  4. Anonymous users will still have access to all the pages (I might limit the features though). Can I do this and can I somehow track anonymous users?
  5. Can I customize the create user account control to not have security question and answer?

Any useful video tutorials on membership api is really appreciated

A: 

You should look into building custom providers.

Here is one good video tutorial to get you started

http://www.asp.net/%28S%28ywiyuluxr3qb2dfva1z5lgeg%29%29/learn/videos/video-189.aspx

CodeToGlory
+1  A: 

Hi

1) Yes, you can integrate an existing database. See here. This will create all the Membership tables and stored procedures required to use the API.

2) You can use whatever ID you want. Usually, if it's not a GUID, it's an incrementing INT.

3) The tool in the link above installs the required tables. AFAIK, there are no tables for Web Parts in that installation, but that may need confirming.

4) You can allow anonymous users to access whatever areas you like. You can place restrictions via the authorization attribute in the web.config file. To track anonymous users, this is quite a good article.

5) You can customize the user account to however you like. If you want to remove the Security Question and Answer section, you can. Requires a bit of configuration, but there's some tutorials over at ASP.NET and 4GuysFromRolla.

You could use a custom provider instead as CodeToGlory mentioned. See what would suit you best. But, don't forget to make a backup of your database before starting either methods, just incase something goes wrong :)

keyboardP