Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

Affordable ASP.NET Hosting Service
  Ads  
Iron Speed Designer is a software development tool for building database, reporting, and forms applications for .NET without hand-coding.
 


  Sponsors  

Meet Our Sponsors

WebSecureStores -- ASP.NET & DotNetNuke Hosting Solutions
FCKeditor Project
Salaro -- Skins and more
OnyakTech
The best choice for your web site host, email hosting, and domain registration.
CrystalTech Web Hosting™
 


DotNetNuke Forums
 
  Forum  DotNetNuke® Pro...  Authentication ...  GetUserRole Method
Previous Previous
 
Next Next
New Post 5/5/2008 12:34 PM
User is offline Brandon Haynes
698 posts
everysport.net
7th Ranked


Re: GetUserRole Method 

Actually, the RoleProvider implements a singleton pattern and does not have a public constructor.  As such, you are correct in accessing the object through it's Instance() static accessor.  You won't be able to instantiate the class directly.

However, I beleive your approach might be a bit flawed when you use the RoleProvider in the first place.  The RoleController exposes a GetRoleByName method that would appear to better meet your needs:

Dim RoleController as new RoleController()

RoleInfo info = RoleController.GetRoleByName(portalId, roleName)

If you haven't already, I highly suggest browsing this object with Visual Studio's Object Browser to get a better feel for the class's topology.

Brandon


Brandon Haynes
BrandonHaynes.org
 
Previous Previous
 
Next Next
  Forum  DotNetNuke® Pro...  Authentication ...  GetUserRole Method
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


WDK Solutions
Quality modules for the DotNetNuke community. Check out our 'wild' modules!
wdkns.com
UK - DotNetNuke providers
UK providers of DNN module development and skin package design. Oxford Information Labs provides cost-effective solutions for businesses and organisations specialising in Skin design and bespoke module development.
www.oxil.co.uk
TronixSoft
Hosting for local businesses that want more from their websites.
www.TronixSoft.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP