Unrecognized attribute 'securityTrimmingEnabled'. Note that attribute

Saw this error today working with the SiteMapDataSource in ASP.NET 3.5/VS2008. Apparently this is a bug that has been around for a while, and is discussed here and logged in Connect here.

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>

If you liked this post, consider subscribing to email updates about my new posts, or sharing it on Hacker News.

Keyboard shortcuts

?
Show this help
Esc
Close this help or an open menu
n
Next (newer) post: SimpleCMS on CodePlex
p
Previous (older) post: VS2008 Shipping November 2007
Tab
Move between links and buttons (Shift+Tab to go back)