May 21, 2008 at 11:39 PM
Edited May 21, 2008 at 11:40 PM
I am trying to incorporate the blog into an existing application. So, I'm using the built-in .Net Membership and Roles providers for logging my users in. My users are able to login fine, but the "roles" attribute of the web.sitemap and the "IsAccessibleToUser"
in the menu.ascx.cs is no longer functioning.
No matter what role(s) I set each node, ALL nodes are still displaying. If I call Roles.GetRolesForUser(Membership.GetUser()), then the correct role(s) for the current logged in user are displayed. But, that really doesn't matter because, again, no matter
what role(s) I put in the web.sitemap, all nodes are still shown.
Here's what I've got...
My login code-behind:
if (Membership.ValidateUser(username.Text, password.Text))
ErrorLbl.Visible = true;
<siteMap defaultProvider="SecuritySiteMap" enabled="true">
<add name="SecuritySiteMap" type="System.Web.XmlSiteMapProvider" securityTrimmingEnabled="true" siteMapFile="Web.sitemap" />
Everything else is the same as the blog app.