473,322 Members | 1,614 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,322 software developers and data experts.

Unable to get list of roles

Hi

When I try to get a list of roles using

RolesArray = Roles.GetAllRoles()

the array returned is Nothing. However if I assign a user to a role as below

Roles.AddUserToRole(User.UserName, "Feedback")

it works OK.

How can I get the list of roles already in the membership system?

Thanks

Regards
Jun 27 '08 #1
1 1295
Try :

string[] roles = CustomPrincipal.Roles;

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
"John" <in**@nospam.infovis.co.ukwrote in message news:%2***************@TK2MSFTNGP05.phx.gbl...
Hi

When I try to get a list of roles using

RolesArray = Roles.GetAllRoles()

the array returned is Nothing. However if I assign a user to a role as below

Roles.AddUserToRole(User.UserName, "Feedback")

it works OK.

How can I get the list of roles already in the membership system?

Thanks

Regards

Jun 27 '08 #2

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

Similar topics

3
by: CxG | last post by:
How do you retrieve a list of db roles from within T-SQL??? I can't find a sys table that returns a list of roles. sysobjects does not list roles as a object type. I found sp_helprole, but I...
10
by: Steve | last post by:
I'm not sure if I should be using tables here to structure the layout or if CSS is okay. I have a data entry form in which I have floated the labels to one side, and given them a specific width....
2
by: IndianaJonesWB | last post by:
What I'm looking for is a list of roles a particular user is a member of. the closest I've found so far is sp_helprolemember without any arguements. but this gives me all the roles and all the...
1
by: Brian Pittman | last post by:
Hi all, As the subject says I'm having trouble connecting to SQL Server 2K via Visual Studio.NET 2002 (VB). It tells me that SQL Server does not exist or access is denied. I know that the...
8
by: Vivek | last post by:
Hi, I wish to update the LIST<T> created in PARENT FORM from the CHILD FORM. Currently I have declared the LIST<Role> as public in my parent form. What can I do to update the <LIST>? Thanks
0
by: Nachi | last post by:
I have installed SQL Server 2000 with VS 2005 - did not install SqlExpress\Sql 2005. I have a remote Sql Server Instance locally. The normal application connectes to this Sql Server. When I run...
1
by: Mikael71 | last post by:
Hi, I'm currently following the book: Beginning Databases with PostgreSQL, From Novice to Professional with Postgresql-8.2.0-1 Chapter 4, page 76: Accessing You Data. Having followed the book's...
1
by: SkyGringo | last post by:
Hi. We are using SQL Server 2005 64-bit on Windows Server 2003 R2 x64 Enterprise Edition. I have a really weird problem where I have people out there who are placed in the db_owner,...
1
by: Karl | last post by:
Hi all... This is a good one. You'll like this... I am working on a course management tool that allows certain Courses to be cross referenced with Job Roles and, when they are, whether the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.