Unrecognized attribute 'securityTrimmingEnabled'. Note that attribute names are case-sensitive
Date Published: 05 November 2008
The issue, however, is that the securityTrimmingEnabled attribute pops up in Intellisense in VS2008 when editing the web.sitemap file. However, using it results in the error:
Unrecognized attribute ‘securityTrimmingEnabled’. Note that attribute names are case-sensitive.
The bug is in the VS Intellisense – it should not be showing an attribute that is not a viable option. This property is actually set on the provider and configured in web.config. The forum link above has the solution, which I’m reproducing here:
<siteMap defaultProvider=”XmlSiteMapProvider” enabled=”true” >\ <providers>\ <clear />\ <add name=”XmlSiteMapProvider”\ description=”Default SiteMap provider.”\ type=”System.Web.XmlSiteMapProvider”\ siteMapFile=”Web.sitemap”\ securityTrimmingEnabled=”true” />\ </providers>\ </siteMap>
Steve is an experienced software architect and trainer, focusing currently on ASP.NET Core and Domain-Driven Design.