C # Sql SiteMap Provider Security Pruning not working
While I was using web.sitemap, the security setting on my menu worked fine. Now that I switched to Sql Site Map Provider, security pruning just stopped working.
<siteMap enabled="true" defaultProvider="AspNetSqlSiteMapProvider">
<providers>
<add name="AspNetSqlSiteMapProvider" type="SqlSiteMapProvider" securityTrimmingEnabled="true" connectionStringName="SiteMapConnectionString" sqlCacheDependency="SiteMapDatabase:SiteMap"/>
</providers>
</siteMap>
I had to edit proc_GetSiteMap to return the menu items in the correct sort order, but it returns all relevant data from the sitemap table (including roles).
Any help would be appreciated.
+1
a source to share
1 answer
Whether access is restricted to folders that should be restricted by the web.config file.
eg:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.web>
<authorization>
<allow roles="Administrator" />
<deny roles="user"/>
</authorization>
</system.web>
</configuration>
while searching the found link you can also look at it: http://www.mytakeon.net/post/2006/09/The-SQL-SiteMap-Provider-and-trimming-by-roles-%28originally-posted-2006 -09-20% 29.aspx
+1
a source to share