Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Role Provider

Reply
Thread Tools

Role Provider

 
 
John Yopp
Guest
Posts: n/a
 
      06-19-2006
I have created my own custom Membership and Role providers and
everything works fine. However, I want to be able to determine if the
user is in a particular role when I am validating the user. Since this
code is already part of my Role Provide, does anyone know how to
reference the current instance of the Role Provider so that I don't have
to instantiate another instance?

Thanks
 
Reply With Quote
 
 
 
 
Brock Allen
Guest
Posts: n/a
 
      06-20-2006
Roles.Providers["YourProviderID"]

-Brock
http://staff.develop.com/ballen


> I have created my own custom Membership and Role providers and
> everything works fine. However, I want to be able to determine if the
> user is in a particular role when I am validating the user. Since
> this
> code is already part of my Role Provide, does anyone know how to
> reference the current instance of the Role Provider so that I don't
> have
> to instantiate another instance?
> Thanks
>



 
Reply With Quote
 
 
 
 
John Yopp
Guest
Posts: n/a
 
      06-20-2006
Excellent! Thanks for the help.

I suspected it was as simple as this. But, couldn't find any documentation.

Thanks again Brock.



Brock Allen wrote:
> Roles.Providers["YourProviderID"]
>
> -Brock
> http://staff.develop.com/ballen
>
>
>> I have created my own custom Membership and Role providers and
>> everything works fine. However, I want to be able to determine if the
>> user is in a particular role when I am validating the user. Since
>> this
>> code is already part of my Role Provide, does anyone know how to
>> reference the current instance of the Role Provider so that I don't
>> have
>> to instantiate another instance?
>> Thanks
>>

>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Membership or Role Provider // Provider Model // Factories .. How does MS do it? sloan ASP .Net 1 07-03-2007 08:17 PM
AzMan Role Based Security vs. ASP.NET Role Based Security Kursat ASP .Net Security 1 05-07-2007 01:33 PM
Memebership, Role, Profile Provider Liming ASP .Net 1 01-07-2006 06:45 PM
Role-Based Security: ACLs and Role Hierarchies Liet Kynes ASP .Net 0 11-26-2003 08:08 AM
Role-based security: Access the role of current user Jesper Stocholm ASP .Net 2 08-23-2003 06:59 PM



Advertisments