views:

1280

answers:

2

I'm trying to understand the authentication section of the sample project that opens in a new MVC2 project in VS2010. It essentially lets you register, login, etc. I looked through the code that implements this briefly, it looked fairly complicated. (10 tables, 40 sprocs, 10 views, 4 models, 1 model, 1 controller, etc.)

Is it best to utilize this provided framework for authentication? If so, how would I integrate this with my own database models (which has user and role tables, etc.). Also, if I use their framework, are there any performance issues at higher traffic volumes (like SO traffic levels for example), do I need to become responsible for maintaining/backing-up/optimizing the authentication DB as well in this case?

+2  A: 
  • The default MembershipProvider works fine at higher traffic volumes
  • If the default provider does not suit your needs, then you can easily Implement a custom Membership Provider
  • Using the provided interfaces and providers, you get many things for "free". Such as authentication-attributes and integrated security.
  • I have never experienced any problems when integrating with custom database models.
Mickel
Can you please clarify the free things: "authentication-attributes" and "integrated security", ie what are these and how tare they useful? With classic ASP we just dropped a cookie with the userID and checked for that, it worked great. If you used an encrypted cookie that helps with security too.
alchemical
A: 

I strongly recommend two articles, I've implemented my own providers based on fluentNhibernate + my own database structure:

Jarek