I have a custom MemberhipProvider and a custom RoleProvider. I created a custom MemberhipProvider by creating a SimpleMembershipProvider class that implements the MembershipProvider class. After that I changed my web.config and it worked.
So, I used the same approach, creating a custom RoleProvider. Nothing special, just creating a SimpleRoleProvider class that implements the RoleProvider class. But then, when I change the web.config file and run the solution, I get the following error message:
Web.config
<membership defaultProvider="DashboardMembershipProvider"> <providers> <clear/> <add name="SimpleMembershipProvider" type="Dashboard.Web.Controlling.Account.SimpleMembershipProvider" /> </providers> </membership> <roleManager enabled="true" defaultProvider="DashboardRoleProvider"> <providers> <clear/> <add name="DashboardRoleProvider" type="Dashboard.Web.Controlling.Account.DashboardRoleProvider" /> </providers> </roleManager> Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Parser Error Message: No parameterless constructor defined for this object. Source Error Line 78: <add name="SimpleRoleProvider" Line 79: type="Dashboard.Web.Controlling.Account.SimpleRoleProvider" />
So, I searched on the Internet. And I tried the type attribute, which generates the following errors:
Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Parser Error Message: Could not load file or assembly 'Dashboard.Web.Controlling.Account' or one of its dependencies. The system cannot find the file specified. Source Error: Line 78: <add name="SimpleRoleProvider" Line 79: type="Dashboard.Web.Controlling.Account.SimpleRoleProvider,Dashboard.Web.Controlling.Account" />
Any suggestions on how I can get this CustomRoleProvider to work? Any help is much appreciated!
Colin source share