473,398 Members | 2,525 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

role based authentication

I already have a user database and would like to include role based security
on my asp.net pages. I see a lot of articals on how to do it withe sql tables
that ship with 2.0, but not much without. Can anyone give me an example of
how to set a user into a role, say as an Admin, but without using the sql
tables noted above?

Thanks
KES
--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kes
Aug 12 '06 #1
2 1120
If you want to use the Provider mechanism but instead with a custom User
table(s) of your own design, then you need to create your own custom
Membership Provider by overriding the appropriate ProviderBase class.

I have a short article here that illustrates how to do this with Profile,
Membership would be very similar:

http://www.eggheadcafe.com/articles/20060731.asp

Best of luck,
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"WebBuilder451" wrote:
I already have a user database and would like to include role based security
on my asp.net pages. I see a lot of articals on how to do it withe sql tables
that ship with 2.0, but not much without. Can anyone give me an example of
how to set a user into a role, say as an Admin, but without using the sql
tables noted above?

Thanks
KES
--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kes
Aug 12 '06 #2
thanks for replying
i guess i was hoping for something simple like just assigning a few admin
users in the web.config file. something like :
<roles name="Admin" userid="usridxxx" />
--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kes
"Peter Bromberg [C# MVP]" wrote:
If you want to use the Provider mechanism but instead with a custom User
table(s) of your own design, then you need to create your own custom
Membership Provider by overriding the appropriate ProviderBase class.

I have a short article here that illustrates how to do this with Profile,
Membership would be very similar:

http://www.eggheadcafe.com/articles/20060731.asp

Best of luck,
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"WebBuilder451" wrote:
I already have a user database and would like to include role based security
on my asp.net pages. I see a lot of articals on how to do it withe sql tables
that ship with 2.0, but not much without. Can anyone give me an example of
how to set a user into a role, say as an Admin, but without using the sql
tables noted above?

Thanks
KES
--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kes
Aug 12 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: hazz | last post by:
If I successfully run a VS.NET app which includes the following; ************************** APP 1 **************************** m_iIdnt = new...
2
by: Jesper Stocholm | last post by:
I have implemented role-based security within my ASP.Net application. However, it seems the role is not passed to the authentication ticket I create. I want to use it to display/hide some...
1
by: Mike Logan | last post by:
Questions about Role Based Security in ASP.Net: I have a few questions about role based security in an ASP.Net application. Below are some points about our system: - We have a hierarchical...
5
by: Archer | last post by:
I was making a role-based authentication but it does't login with correct password. the HttpContext.Current.User recieved in Global.asax is always null. Request.IsAuthenticated is always false....
1
by: Hennie | last post by:
Ho can I get the role of the user in a ASP.net 2.0 web application? I am using AspNetSqlProvider to manage my membership. I can get the user by using User.Identity.Name. What will the command be to...
5
by: Jon Skeet [C# MVP] | last post by:
I've got a web service where different methods require different roles, and I'm trying to enforce that now. I've worked out *one* way of doing things, using PrincipalPermissionAttribute - but...
7
by: nugget | last post by:
Role-based security for an ASP/ASP.NET mixed environment Hello: My co-worker and I have been charged with designing role-based security for our intranet. The technologies we have to work with...
3
by: nimmyjo | last post by:
Hi friends, I have done role based authentication, now has two roles ,Admin and User. using location tag in web.cofig. FormAuthentication.DirectfromLoginpage is working fine. But I am not able to...
6
by: Max2006 | last post by:
Hi, I need to hide a series of siteMapNodes to certain roles. That means roles have access to the siteMapNode, but the node doesn't appear on the navigation menu. I'll use Response.Redirect to...
3
by: RedHair | last post by:
I use the Form Authentication and Role base security to secure one ASP.NET 3.5 appication. Below are security settings in web.config <location path="testAdmin.aspx"> <system.web>...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.