views:

37

answers:

1

Hi All,

The problem: client needs a website to serve 10+ customers, each customer has 5-10 people they wish to grant access using login & user name, once "logged in" the user can download files specific to their company.

The files will be uploaded to a directory under the customer name, and displayed as a list. Currently using membership for all of the users, it's just the "by customer" segmentation I'm wondering about. the question being under ASP.NET MVC what is the cleanest or simplest approach to solving the customer segmentation, trying to avoid customer membership provider so was going to use the roles to assign customer group.

Thoughts appreciated.

+2  A: 

In the past I tried to avoid the membership and role providers as well since I don't like the way they are implemented. So just use the old school way. Create two tables on your db, one stores the customers the other the users.

Just build a simple relationship like: User n ----- 1 Customer

Now if a user logs in first authenticate him/her against the User table, then authorize on the Customer table.

The provide the right downloads, just create an additional table File, which has a n:1 relationship to the Customer table (like the User table).

Dänu