Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
hey experts!
i am trying to make a asp.net website . im interesting to make my own data providers for my custom user data !
 
for authentication i decide use FormsAuthentication .
for saving custom user data i decide to make my own custom profile provider.
for Authorization i want use Role Authorization
 
first is my desicion true? i should change it? no need use something else instead Pofile for saving data through the application?
 
second , i need make my own custom Role provider to use Role for Authorization i want use Role Authorization?
 
third, is this scheme true? and i should code in this scheme? or maybe its better to have a column named Role in my custom profile Table and make a custome and simple Authorization !?( checking Role column to know whats user role then show its proper content )
picture to show scheme in my mind
 
very thanks !
Posted 26-Mar-13 16:36pm
Edited 27-Mar-13 12:22pm
v6
Comments
ryanb31 at 27-Mar-13 7:29am
   
When it comes to authorization and authentication, there are many options so what is best will depend on your situation and also be up to you.
source.compiler at 27-Mar-13 7:35am
   
i know... but my question is i should use Role provider for authorization or can i choose a role column for profile table ?
and if i choose a column named Role, can i use url authorization?
source.compiler at 27-Mar-13 11:39am
   
well maybe its better use clomn in prfile table! but another problem is about setting profile items! can anyone help?

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

What you suggest is certainly achievable. Personally I use the default providers built in to .net as most of the effort is taken care of see here for information about these[^]. The SQL providers work in conjunction with MS SQL-Server and you can even created the database using the built in aspnet_regsql.exe[^]
 
That said, one size does not fit all, you can subclass the existing providers (including the base providers for a completely clean slate) to create custom ones, but I think this is only worth it if the existing ones do not meet your requirements. My advice is to try the existing ones for each tranche of functionality (auth, roles etc) until they don't do what you want and then work on your own custom provider.
  Permalink  
Comments
source.compiler at 28-Mar-13 10:50am
   
vary thanks ... for my wishes , customs are well . so i used normal FormsAuthentication and made a custom Profile ! everything seems good and my problem is how use URL authorization!? i mean how can i use Roles with my custom profile! i should make my own role provider? or its better to make a column named Role in my custom profile table?! and with this i should authorize programmatically and cant use URL authorize ! can i?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 190
1 Jochen Arndt 155
2 PIEBALDconsult 150
3 Afzaal Ahmad Zeeshan 120
4 DamithSL 115
0 OriginalGriff 5,695
1 DamithSL 4,591
2 Maciej Los 4,012
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,190


Advertise | Privacy | Mobile
Web02 | 2.8.141220.1 | Last Updated 28 Mar 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100