Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Not able to get the Roles?Not able to get the Roles?
Previous
 
Next
New Post
11/29/2006 4:13 AM
 
 

Hi all,

I have a big problem and it goes something like this.

  iwm is an existing Role.

   Dim asRoles() As String
   Dim asUsers() As String
   Dim sEmail As String
   Dim iUser As Integer

   asRoles = Roles.GetAllRoles()
   asUsers = FetchUsers("iwm")

 

in the web.config:

  <roleManager defaultProvider="SqlProvider"
   enabled="true"
   cacheRolesInCookie="true"
   cookieName=".ASPROLES"
   cookieTimeout="30"
   cookiePath="/"
   cookieRequireSSL="false"
   cookieSlidingExpiration="true"
   cookieProtection="All" >
   <providers>
    <add
      name="SqlProvider"
      type="System.Web.Security.SqlRoleProvider"
      connectionStringName="SiteSqlServer"
      applicationName="DotNetNuke"
     />
   </providers>
  </roleManager>

I have followed the help but it didn't help.

asRoles = Roles.GetAllRoles()

returns nothing and so I get an error saying Role "iwm" does not exsist.

Thanks,

Lee

 

Lee B
Owner
S@W Designs
Outsourcing partner
Developer forums and Help.
 
New Post
11/29/2006 9:17 AM
 

Have you tried this?

Roles.GetUsersInRole(

"iwm")
 
New Post
11/29/2006 10:08 AM
 
thank you Prof,

the answer is:

Private Function FetchUsers(ByVal Role As String) As ArrayList
Dim objRoles As New Security.Roles.RoleController

Return objRoles.GetUsersByRoleName(PortalId, Role)
End Function

this should help others too

Lee

Lee B
Owner
S@W Designs
Outsourcing partner
Developer forums and Help.
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Not able to get the Roles?Not able to get the Roles?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out