I’m trying to create a custom role provider in a class library, and for some reason I can’t reference System.Web.Security.RoleProvider.
I have added a reference to System.Web in the project, yet still no luck. Is there a reason why I can’t do this?
You need to reference the assembly
System.Web.ApplicationServices.dll. TheRoleProviderclass is not defined inSystem.Web.dll.In this cases and when in doubt check the MSDN page for the associated class and at the top of the page you can see in what namespace and assembly it is defined.
For the
RoleProviderclass you have: