this isn't asp.net specific, some of these apps are WinForms, also will be adding some Wpf and possibly some silverlight apps in the future.
I’ve a requirement to put role & permissions based access security into a new app we’re developing here.
The .net RoleProviders in general, and SqlRoleProvider in particular seem to have everything we need, however I’ve a few concerns around the Db Schema changes aspnet_regsql needs.
I’ve tried googling for these but I’m not sure what to ask for.
- How straightforward (or not) is it going to be to upgrade this between .net versions?
- Will .Net 2.0 and .net 3.5 apps happily use the same schemas? i.e. Can we have .net 2.0 and 3.5 apps use the same permissions in the same Db?
- How stable are the Sql Security providers, is anyone out there using them in anger? Are they worth using?
Am I better off biting the bullet and implementing my own – limited – Role functionality (that will do everything I need) and my own custom RoleProvider?
As you can see I'm caught between "not wanting to re-invent the wheel" and "not getting stuck with problems with some unknown 3rd party code" (unknown to me anyway, that's why I'm asking you)
Thanks in advance for your advice & testimonials,
I've been using the built-in providers for years now (on different projects) with no issues. Nothing has changed since it was roled out for 2.0.
If the sql provider does everything you need, go with it, there's little reason to roll out your own unless you need additional functionality.
The one thing you can keep your eye on - and this applies to profile, membership and roles - is the efficiency of the sprocs. If you look at the sprocs you'll see that there is activity around getting data from the various tables on every execution. For example, almost every query (that I remember looking at), queries for the appid for the current request. If you only have one app running on the DB that may be overkill and can be changed. This article (The Code Project) by Omar Al Zabir talks about profile improvements.