Search all node

Apr 11, 2013 at 2:46 PM
Hello guys,

I'm trying to do a routine that traverses every node of the sitemap and save them on the bench.
But when I try to get the property "Area", the same is not returned.
Does anyone know how to solve this problem.
var siteMapNode = (MvcSiteMapProvider.MvcSiteMapNode)System.Web.SiteMap.RootNode;
                siteMap.ResourceKey = siteMapNode.ResourceKey;
                siteMap.Ordem = 0;
                siteMap.Title = siteMapNode.Title;
                siteMap.Description = siteMapNode.Description;
                siteMap.Area = siteMapNode.Area;
                siteMap.Controller = siteMapNode.Controller;
                siteMap.Action = siteMap.Action;

                siteMap.UsuarioCadId = this.UsuarioLogin.UsuarioId;

                siteMap.Ativo = true;

                siteMap.DataHoraCad = DateTime.Now;

                siteMapService.InsertOrUpdate(siteMap);
<?xml version="1.0" encoding="utf-8" ?>
<mvcSiteMap xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://mvcsitemap.codeplex.com/schemas/MvcSiteMap-File-3.0"
xsi:schemaLocation="http://mvcsitemap.codeplex.com/schemas/MvcSiteMap-File-3.0 MvcSiteMapSchema.xsd"
enableLocalization="true">

    <mvcSiteMapNode title="Sistema" area="Sistema" clickable="false" resourceKey="caff589d-090a-4174-9140-3ce1b7292946">
        <mvcSiteMapNode title="CRM" area="CRM" controller="Home" action="Index"  resourceKey="64290e2e-fb76-41ac-b24a-5c6740cc60b0">
            <mvcSiteMapNode title="Banco" area="Sistema" controller="Banco" action="Index" resourceKey="2a5993d5-2126-4ebc-a165-09fef8dc73d2"/>
        </mvcSiteMapNode>
    </mvcSiteMapNode>

</mvcSiteMap>
Apr 11, 2013 at 3:00 PM
excuse me.
error in web.config.
the default site map was pointing to another file.
problem solved.