In order to build my web site I choose to use the Visual studio 2010 environment. So, I have the factories where the internet surfer can go there from two different ways. One way is to go by choosing the geographical name from the map, which will drive him in an aspx file in a certain place in my directory tree. The second way is to find the factory from the products page. In the second way I use a “site map” in my code with the appropriate entries in my web.config file;
<siteMap defaultProvider="XmlSiteMapProvider" enabled="true">
<providers>
<add name="XmlSiteMapProvider" description="Default SiteMap provider" type="System.Web.XmlSiteMapProvider" siteMapFile="Web.sitemap" securityTrimmingEnabled="true"/>
<add name="ProductsSiteMapProvider" description="Products SiteMap provider" type="System.Web.XmlSiteMapProvider" siteMapFile="Products.sitemap" securityTrimmingEnabled="true"/>
</providers>
In my products.sitemap I’m writing the following entries;
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="~/pages/products.aspx" title="Products" description="Greek Olive Products">
<siteMapNode url="~/pages/products/oevoo/oevoo.aspx" title="Organic Extra Virgin Olive Oil" description="Find the Cultivation areas for this commodity" >
<siteMapNode url="~/pages/products/oevoo/agioideka.aspx" title="Flathiakes" description="Cultivation Area Flathiakes, Herakleion Crete" />
<siteMapNode url="~/pages/products/oevoo/handrinos.aspx" title="Handrinos" description="Cultivation Area Handrinos, village mountainous Messinia south-west Peloponnese " />
</siteMapNode>
<siteMapNode url="~/pages/products/evoo/evoo.aspx" title="Extra Virgin Olive Oil" description="Find the Cultivation areas for this commodity" >
<siteMapNode url="~/pages/districts/areas/agioideka.aspx" title="Flathiakes" description="Cultivation Area Flathiakes, Herakleion Crete" />
<siteMapNode url="~/pages/districts/areas/acova.aspx" title="Acova" description="Standardization factory in Argolida east Peloponnese" />
<siteMapNode url="~/pages/districts/areas/trikorfo.aspx" title="Trikorfo" description="Cultivation Area Trikorfo, mountainous area in south Peloponnese" />
<siteMapNode url="~/pages/districts/areas/handrinos.aspx" title="Handrinos" description="Cultivation Area Handrinos, village mountainous Messinia south-west Peloponnese " />
</siteMapNode>
<siteMapNode url="~/pages/products/voo/voo.aspx" title="Virgin Olive Oil" description="Find the Cultivation areas for this commodity" >
<siteMapNode url="~/pages/districts/areas/acova.aspx" title="Acova" description="Standardization factory in Argolida east Peloponnese" />
<siteMapNode url="~/pages/districts/areas/trikorfo.aspx" title="Trikorfo" description="Cultivation Area Trikorfo, mountainous Messinia south Peloponnese" />
</siteMapNode>
<siteMapNode url="~/pages/products/to/to.aspx" title="Greek Table Olives" description="Find the Cultivation areas for this commodity" >
<siteMapNode url="~/pages/districts/areas/trikorfo.aspx" title="Trikorfo" description="Cultivation Area Trikorfo, mountainous Messinia south Peloponnese" />
</siteMapNode>
</siteMapNode>
Finally when I’m trying to run (locally) my web site it gives me the following error;
Multiple nodes with the same URL '/WebSite2/pages/districts/areas/acova.aspx' were found. XmlSiteMapProvider requires that sitemap nodes have unique URLs.
Of course I see that the sitemap provider did not accept multiple url’s leading to the same position. My question is what I can do to use multiple entries in my products.sitemap?