I am having trouble using my custom role provider with a web application so I created two minimal projects - one as a web site and the other as a web application project. They are as alike as I can make them, consisting of a default.aspx page, a login.aspx page, a web reference to a web service I am using for authentication/authorization, and my two custom classes, CustomMembershipProvider.vb and CustomRoleProvider.vb
The web site version works fine (in that it redirects to login.aspx). The web application project version can't load the roles provider. I get a yellow screen with:
Parser Error Message: Could not load type 'CustomRoleProvider'.
The web.config files are identical in the authorization, authentication, membership and roleManager sections; the code in the CustomRoleProvider claass is exaclty the same. I don't have any trouble dimming something as an instance of CustomRoleProvider in code.
Does the web application project require a different schema here? What the hey is going on?
<authorization><deny users="?"/><allow roles="AUTHUSERS"/><deny users="*"/></authorization><authentication mode="Forms"><forms name="SecurityCookie" loginUrl="~/Login.aspx" protection="All" timeout="180"></forms></authentication><membership defaultProvider="CustomMembershipProvider"><providers><add name="CustomMembershipProvider" type="CustomMembershipProvider" requiresQuestionAndAnswer="false"/></providers></membership><roleManager enabled="true" defaultProvider="CustomRoleProvider" cacheRolesInCookie="true"><providers><add name="CustomRoleProvider" type="CustomRoleProvider"/></providers></roleManager>