Roles in membership database
- From: "AC" <andy.collyer@xxxxxxxxx>
- Date: 19 Mar 2007 13:56:34 -0700
Hi there. My asp.net 2.0 development website uses roles to control
access to sections of my site, configured using the asp.net
configuration tool, which is great. Except that isn't available once
published on the public, third-party hosted site. So I need to be
able to configure access through a new section of the site, available
only to admins/developers, which I'm about to write.
First off, I want to create a role in the database to represent users
who can access this area of the site - and I need to be able to do it
manually so I can test as I'm developing. I've created my new role in
my membership database by adding a row to the aspnet_Roles table and
added a user to that role by adding a row to the aspnet_UsersInRoles
table. However, Roles.GetRolesForUser() returns a zero-dimensioned
string array so I must have missed a trick somewhere ... can anyone
point me in the right direction please?
The membership database works fine in that any old user can come
along, register, gain access to members-only sections, etc., it's just
the roles-without-aspnet-config-tool I seem to be having trouble
with.
Thanks for your time,
AC
.
- Follow-Ups:
- Re: Roles in membership database
- From: Erik Funkenbusch
- Re: Roles in membership database
- From: sloan
- Re: Roles in membership database
- Prev by Date: Re: ASP.net beginner question
- Next by Date: Re: User attached to other user's session
- Previous by thread: Re: setting the font color to red for Dropdownlist control list item
- Next by thread: Re: Roles in membership database
- Index(es):