Alex Rivera | Logout

Why should I use ASP.NET Membership security model?

Asked 2009-01-13T20:05:49.857
28

I'm updating my website at the moment and figure that if I am to update my login/security mode, now is a good time.

I have looked through the Membership model which is included in ASP.NET but I'm not convinced that it will provide any benefit apart from being familiar to other .NET developers.

There seems to be quite a lot of documentation for it, but little discussion for why its worth the effort.

Can anybody shed some light upon this?

Edit
Report

2 Answers

9

I wrote my own after reading through all the stored procedures in the ASP.NET Membership provider. It's not hard and you have much more control at the end of the day.

If you like XML configuration, weakly-typed strings for roles, insecure by default, random web.config files littered through your directories instead of a clean marker interface on your page classes to say 'no account required', multiple database hits for a single login, user objects that aren't loaded from your current ObjectContext/DataContext and the ability to change providers on the fly (woo hoo, who uses that?!) go for the built-in one.

If not, build your own, but if you do, make sure you store an encrypted/salted hash of your passwords, and do a proper encrypted cookie please.

[Updated to reflect feedback in comments]

answered 2010-04-17T01:44:44.043
0

It's value is that it is an easy to use ready built role based security framework. If you have already built your own framework and migration is not trivial then it may not be worth it. But one benefit of migrating would be you could eliminate a lot of application code and replace with framework code.

answered 2009-01-13T20:15:04.297

Your Answer