I currently have different sitemaps for different regions. Each one has its own sitemap file. For some reason in the web config I can't seem to get sitemap trimming to work. It denies the user entry but it still shows up on my menu. Here's the code below.
Thanks for the help.
<?xml version="1.0"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<connectionStrings>
<add name="PITHELPConnectionString"
connectionString="Data Source=rmcssmsql003;Initial Catalog=PITHELP;Persist Security Info=True;User ID=PITHELP; Password=PITHELP;" />
</connectionStrings>
<system.web>
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
</assemblies>
</compilation>
<customErrors mode="Off"/>
<identity impersonate="true"/>
<authentication mode="Windows"/>
<authorization>
<allow roles="CS\CO SUPPORT PIT WEB DEV ADMIN"/>
</authorization>
<siteMap enabled="true">
<providers>
<add name="Colorado" type="System.Web.XmlSiteMapProvider" siteMapFile="~\App_Data\CO_Web.sitemap" securityTrimmingEnabled="true"/>
<add name="Hawaii" type="System.Web.XmlSiteMapProvider" siteMapFile="~\App_Data\HI_Web.sitemap" securityTrimmingEnabled="true"/>
<add name="MAS" type="System.Web.XmlSiteMapProvider" siteMapFile="~\App_Data\MAS_Web.sitemap" securityTrimmingEnabled="true"/>
<add name="NW" type="System.Web.XmlSiteMapProvider" siteMapFile="~\App_Data\NW_Web.sitemap" securityTrimmingEnabled="true"/>
</providers>
</siteMap>
</system.web>
<location path="Management/Management.aspx">
<system.web>
<authorization>
<deny users="*" />
<allow roles="cs\CO_HomeIV_WebApp_Users"/>
</authorization>
</system.web>
</location>
</configuration>
dataro
Member
25 Points
27 Posts
SiteMap Trimming for multiple Sitemaps
Jun 15, 2012 05:08 PM|LINK
I currently have different sitemaps for different regions. Each one has its own sitemap file. For some reason in the web config I can't seem to get sitemap trimming to work. It denies the user entry but it still shows up on my menu. Here's the code below. Thanks for the help.
<?xml version="1.0"?> <!-- For more information on how to configure your ASP.NET application, please visit http://go.microsoft.com/fwlink/?LinkId=169433 --> <configuration> <connectionStrings> <add name="PITHELPConnectionString" connectionString="Data Source=rmcssmsql003;Initial Catalog=PITHELP;Persist Security Info=True;User ID=PITHELP; Password=PITHELP;" /> </connectionStrings> <system.web> <compilation debug="true" targetFramework="4.0"> <assemblies> <add assembly="System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> </assemblies> </compilation> <customErrors mode="Off"/> <identity impersonate="true"/> <authentication mode="Windows"/> <authorization> <allow roles="CS\CO SUPPORT PIT WEB DEV ADMIN"/> </authorization> <siteMap enabled="true"> <providers> <add name="Colorado" type="System.Web.XmlSiteMapProvider" siteMapFile="~\App_Data\CO_Web.sitemap" securityTrimmingEnabled="true"/> <add name="Hawaii" type="System.Web.XmlSiteMapProvider" siteMapFile="~\App_Data\HI_Web.sitemap" securityTrimmingEnabled="true"/> <add name="MAS" type="System.Web.XmlSiteMapProvider" siteMapFile="~\App_Data\MAS_Web.sitemap" securityTrimmingEnabled="true"/> <add name="NW" type="System.Web.XmlSiteMapProvider" siteMapFile="~\App_Data\NW_Web.sitemap" securityTrimmingEnabled="true"/> </providers> </siteMap> </system.web> <location path="Management/Management.aspx"> <system.web> <authorization> <deny users="*" /> <allow roles="cs\CO_HomeIV_WebApp_Users"/> </authorization> </system.web> </location> </configuration>CPrakash82
All-Star
18168 Points
2833 Posts
Re: SiteMap Trimming for multiple Sitemaps
Jun 18, 2012 02:57 AM|LINK
Try seperating your roles with ','.
Make sure you have Roles defined on your SiteMap Node Too.
thanks,