none
Login design in ASP.NET: customers and employees RRS feed

  • Question

  • Scenario: I designed a web application for a company. Both the customers and the employees need to log in the system, then according to the role and userName, different operations will be done!

    Questions: How should I design the tables and how to implement the log in. I need some suggestions in real practice but not the academic homework. Thank you!

    First, I don't know how to design the tables, How many tables do I need to design?
    One table includes the UserName, Password, and the Role?
    Or two tables, one is the customer talbe (customerName, Password), the other is the employee table (employeeName, Password, Role).

    Second, If I designed two tables, in the real practice, do I need to implement two "log in" to tell the customer and the employee apart (I don't want to the customers see the employee log in). Or I only need to design one "log in", and the program need to tell the customers and employees apart, if so, how should I do?

    Thank you!

    Tuesday, October 23, 2007 3:57 PM

Answers

  • You have two options one you go to the location below in your C drive and use the aspnet_regsql to create the Asp.net application services database and separate your user with roles.  Two you create two databases use one for Windows authenticated part of your application used only by employees using authorization section for your employees. And create another database use forms authentication with roles for your customers.  The first is simple while the second can get complicated because the applicationname is a property which means all databases will use one name. The first link how to configure ASPNETBD and the second how to create roles with few lines of code.  There are many video walk through at the Asp.net forums under learning.   Hope this helps.

     

    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727


    http://weblogs.asp.net/scottgu/archive/2005/08/25/423703.aspx


    http://weblogs.asp.net/scottgu/archive/2005/10/18/427754.aspx

     

    Tuesday, October 23, 2007 6:04 PM

All replies

  • ASP.Net 2 has a membership provider that will do most of the work for you.

     

    Check out: http://msdn2.microsoft.com/en-us/library/Aa479031.aspx

    Tuesday, October 23, 2007 4:35 PM
  • You have two options one you go to the location below in your C drive and use the aspnet_regsql to create the Asp.net application services database and separate your user with roles.  Two you create two databases use one for Windows authenticated part of your application used only by employees using authorization section for your employees. And create another database use forms authentication with roles for your customers.  The first is simple while the second can get complicated because the applicationname is a property which means all databases will use one name. The first link how to configure ASPNETBD and the second how to create roles with few lines of code.  There are many video walk through at the Asp.net forums under learning.   Hope this helps.

     

    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727


    http://weblogs.asp.net/scottgu/archive/2005/08/25/423703.aspx


    http://weblogs.asp.net/scottgu/archive/2005/10/18/427754.aspx

     

    Tuesday, October 23, 2007 6:04 PM