roleManager using a Custom role provider

J

John Toop

I've read a number of places that give examples of how to do this but I could
never get it. Most examples used forms authentication but I found if
difficult to understand which steps were important and which weren't, so
here's my contribution:

I created a <roleManager ... /roleManager> tag inside <system.web>

it was a lot simpler than I thought

<roleManager defaultProvider="myRoleProvider" enabled="true">
<providers>
<clear/>
<add name="myRoleProvider" type="Humber.Roles.myRoleProvider" />
</providers>
</roleManager>

Where I got caught was I had no idea that the custom class had to reside
within a nameSpace (I put a nameSpace somename ... End nameSpace around my
class. I named my nameSpace "Humber.Roles" and my class I called
myRoleProvider. The name of the "RoleProvider" that I created within my
custom class became my roleProvider which was called as the defaultProvider.
The type is the concatenation of the namespace and the class inside of it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top