Reputation: 29
I have this code in my web.config but i still have an error. I'm using IIS 7.5 and Windows 7 Pro
> <siteMap>
> <providers>
> <clear/>
> <add name="SiteMapDataSource1" description="Default SiteMap provider." type="System.Web.XmlSiteMapProvider"
> siteMapFile="web.sitemap" />
> </providers> </siteMap>
error
The configuration section 'siteMap' cannot be read because it is missing a section declaration
I have this code in masterPage.master
<asp:TreeView ID="TreeView1" runat="server" CssClass="style6" DataSourceID="SiteMapDataSource1"
Width="220px" AutoGenerateDataBindings="False" Height="263px" ImageSet="Arrows">
<ParentNodeStyle Font-Bold="False" />
<HoverNodeStyle Font-Underline="True" ForeColor="#5555DD" />
<SelectedNodeStyle Font-Underline="True" ForeColor="#5555DD" HorizontalPadding="0px"
VerticalPadding="0px" />
<NodeStyle Font-Size="12pt" ForeColor="Black" HorizontalPadding="5px" NodeSpacing="0px"
VerticalPadding="0px" Font-Names="Times New Roman" />
</asp:TreeView>
<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" ShowStartingNode="true"
EnableViewState="false" />
Upvotes: 1
Views: 1662
Reputation: 543
You have to put your <siteMap>...</siteMap>
inside <system.web>...</system.web>
to get it to work.
More info: http://msdn.microsoft.com/en-us/library/ms178428.aspx
Upvotes: 1