J
jmorgret
In my application I am using the WebControls Menu and SiteMapDataSource.
Everything works fine until...
I try to add the sitemap provider to the web.config. If I don't add a
provider the SiteMapDataSource finds the web.sitemap on it's own and
works fine but if I add it as a provider in the web.config then it
doesn't load anything into the menu.
My ultimate objective is to have two sitemaps but even just adding a
second sitemap to the project seems to mess it up. Here is my code.
Web.config:
<siteMap>
<providers>
<add siteMapFile="web.sitemap" name="AspNetXmlSiteMapProvider"
securityTrimmingEnabled="true"
type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.0.0,
Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a" />
<add siteMapFile="short.sitemap" name="ShortSiteMapProvider"
securityTrimmingEnabled="true"
type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.0.0,
Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a" />
</providers>
</siteMap>
aspx page:
<asp:SiteMapDataSource ID="SiteMapDataSource1"
runat="server" ShowStartingNode="False"
SiteMapProvider="ShortSiteMapProvider" />
I have tried this with just one sitemap (web.sitemap) and I still could
not get it to work.
Any suggestions? Thanks.
Everything works fine until...
I try to add the sitemap provider to the web.config. If I don't add a
provider the SiteMapDataSource finds the web.sitemap on it's own and
works fine but if I add it as a provider in the web.config then it
doesn't load anything into the menu.
My ultimate objective is to have two sitemaps but even just adding a
second sitemap to the project seems to mess it up. Here is my code.
Web.config:
<siteMap>
<providers>
<add siteMapFile="web.sitemap" name="AspNetXmlSiteMapProvider"
securityTrimmingEnabled="true"
type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.0.0,
Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a" />
<add siteMapFile="short.sitemap" name="ShortSiteMapProvider"
securityTrimmingEnabled="true"
type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.0.0,
Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a" />
</providers>
</siteMap>
aspx page:
<asp:SiteMapDataSource ID="SiteMapDataSource1"
runat="server" ShowStartingNode="False"
SiteMapProvider="ShortSiteMapProvider" />
I have tried this with just one sitemap (web.sitemap) and I still could
not get it to work.
Any suggestions? Thanks.