Greetings - I was referred here by MSDN forums hope this is the right place -
I have a custom control (:WebControl) that renders web.sitemap in a specific way. While it runs error free and produces the expected result, at Design-Time it complains
Error Creating Control - MyControl The provider 'AspNetXmlSiteMapProvider' specified for the defaultProvider does not exist in the providers collection.
I have discovered that the error is cause by this line of code:
string div = string.Format("<div class='{0}' id='{1}'>{2}</div>", this.CssClass, this.ID.ToString(), EnumerateNodesRecursive(SiteMap.RootNode, level));
or more specifically, by the reference to SiteMap.RootNode - I am not clear what is missing thoough because I have configured the SiteMapProvider in web.config as this:
<siteMap>
<providers>
<clear/>
<add name="AspNetXmlSiteMapProvider"
type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
siteMapFile="web.sitemap"
securityTrimmingEnabled="true"/>
</providers>
</s
View Complete Post