2

Scenario : A web application with user login, roles and permissions.

Question :

  • Is it better to start with Visual Studio's / Visual Web developer Express edition's project wizard which contains the user management with it OR start an empty project?
  • If started with wizard, How can I move the membership and role Database tables to my own database?
  • Programatically working with Membership and roles. How?
  • If started with empty project, How can I manage membership and roles etc. ?
  • How to add new fields in user profile?

I am in student level in .NET. Above are some confusions I encountered while trying to start developing a project. It might be some silly question. Please do not ignore. Guide me with some helpful hints and good links if necessary.

EDIT:

I found a good tutorial here : http://www.codeproject.com/KB/aspnet/ASPDOTNETauthentication.aspx It solved 50% of my problem.

Muneer
  • 7,384
  • 7
  • 38
  • 62

1 Answers1

1

It sounds like you need to start with some good tutorials on how to do authentication. Here are a couple that I think would be helpful:

http://www.csharpfriends.com/Articles/getArticle.aspx?articleID=70

http://www.youtube.com/watch?v=8t1MoIsMUKE

Because you have a student level understanding of .NET, I would recommend practicing a few times using these and other tutorials before trying to do everything you want to do.

As for wizard vs. empty project, I don't like wizards. There is too much I want to change and if I forget about something I end up with code bits hanging around and that is never good.

If you code the system by hand and store your authentication information in a database, you can manage the roles/permissions/etc. with simple SQL calls.

IAmTimCorey
  • 16,412
  • 5
  • 39
  • 75
  • A major reason for my confusion is because I have followed many tutorials. All topics have it. When come to the real problem only I ended up with those question. "Which one to use?". "WHICH". I wanted to know which approach can satisfy specific needs. As basic, I know most of the wizards can not go too far without major modifications imo. – Muneer May 28 '11 at 19:52
  • @Muneer - Well, I spoke to that a bit but to be clearer, I would say don't use the wizard, store the authentication information in a database, and then manipulate it programmatically using simple SQL calls. As for adding fields, that can be done by altering the database table (although you should try to plan the table out in the first place and do it once). – IAmTimCorey May 28 '11 at 19:58
  • Will it not hurt the Entity classes associated with Membership & Role provider tables if I alter table fields? – Muneer May 29 '11 at 05:17
  • @Muneer - yes, you will need to update your Entity class if you modify the table. That is why I said to plan ahead - these changes aren't minor. – IAmTimCorey May 29 '11 at 05:43
  • AFAIK there are predefined methods, properties for inserting and updating membership and roles with .NET Membership provider. How to tell those classes about the new field? – Muneer May 29 '11 at 06:35