Rolemanager not working when ASPDotNetStorefront served in a virtual folder with FormsAuthentication
- by digiguru
Does anyone know if there is a valid roleManager I can apply to ASPDotNetStorefront to get the site working?
We have a website that has an ASP.Net storefront served in a virtual folder off the root.
ourwebsite.com
ourwebsite.com/shop
Everything has been workign fine until we put the groundwork in place for forms authentication in the website recently. This caused an error on the production server when you tried to get into the shop...
Unable to cast object of type 'System.Web.Security.RolePrincipal' to type 'AspDotNetStorefrontCore.AspDotNetStorefrontPrincipal'.
Looking at the shop's web.config I noticed there was no RoleManager node, so I tried to fix the problem by removing it in the shop's web.config
<roleManager enabled="false">
</roleManager>
This prevented the error occurring, but also prevented the shopping basket from working.
Instead I removed the rolemanager tag from the root website...
<!-- Conflicting with AspDotNetStorefront
<roleManager enabled="true" defaultProvider="CustomizedRoleProvider">
<providers>
<add name="CustomizedRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="constr" />
</providers>
</roleManager>
-->
This worked, but obviously prevents role authentication working on the root website, which is okay for the next 2 or 3 releases. Anyone know the correct code for the rolemanager in DotNetStorefront?