Click here to Skip to main content
13,000,742 members (57,826 online)
Rate this:
Please Sign up or sign in to vote.
hey experts!
i am trying to make a 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 15:36pm
Updated 27-Mar-13 11:22am
ryanb31 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 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" />
source.compiler 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
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.
source.compiler 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
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170624.1 | Last Updated 28 Mar 2013
Copyright © CodeProject, 1999-2017
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