开发者

Best approach to a customer portal in ASP.NET MVC

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 p开发者_开发技巧rovider so was going to use the roles to assign customer group.

Thoughts appreciated.


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).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜