Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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
Updated 27-Mar-13 11:22am
v6
Comments
ZurdoDev 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.
ali_heidari_ 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?
<deny role="Normal">
ali_heidari_ 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

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.
 
Share this answer
 
Comments
ali_heidari_ 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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900