views:

58

answers:

0

Hi I have add the provider in my web config as below:

 <add name="MvcSiteMapProvider"
             type="MvcSiteMapProvider.DefaultSiteMapProvider, MvcSiteMapProvider"
             siteMapFile="~/Sitemap/SiteMap.sitemap"
             securityTrimmingEnabled="true"

             enableLocalization="true"
             scanAssembliesForSiteMapNodes="true"
             skipAssemblyScanOn=""
             attributesToIgnore="bling"
             nodeKeyGenerator="MvcSiteMapProvider.DefaultNodeKeyGenerator, MvcSiteMapProvider"
             controllerTypeResolver="MvcSiteMapProvider.DefaultControllerTypeResolver, MvcSiteMapProvider"
             actionMethodParameterResolver="MvcSiteMapProvider.DefaultActionMethodParameterResolver, MvcSiteMapProvider"
             aclModule="MvcSiteMapProvider.DefaultAclModule, MvcSiteMapProvider"
             siteMapNodeUrlResolver="MvcSiteMapProvider.DefaultSiteMapNodeUrlResolver, MvcSiteMapProvider"
             siteMapNodeVisibilityProvider="MvcSiteMapProvider.DefaultSiteMapNodeVisibilityProvider, MvcSiteMapProvider"

And here is my .sitemap file

<?xml version="1.0" encoding="utf-8" ?>
<mvcSiteMap xmlns="http://mvcsitemap.codeplex.com/schemas/MvcSiteMap-File-2.0" enableLocalization="true">

    <mvcSiteMapNode title="Classifieds" controller="Classifieds" action="Index"  changeFrequency="Always" updatePriority="Normal">
        <mvcSiteMapNode title="Category" controller="Classifieds" action="ClassifiedSelection"  dynamicNodeProvider="MySite.Helpers.ClassifiedCatDynamicNodeProvider, MySite.Helpers" >
          <mvcSiteMapNode title="SpecificAd" controller="Classifieds" action="SpecificClassified" dynamicNodeProvider="MySite.Helpers.ClassifiedAdsDynamicNodeProvider, MySite.Helpers" >
            <mvcSiteMapNode title="Email Seller" controller="Classifieds" action="EmailSeller" />

        </mvcSiteMapNode>
      </mvcSiteMapNode>
    </mvcSiteMapNode>

</mvcSiteMap>

I have create two dynamic prodiders in a seperate class file- Mine a basiclly the same. (as shown here http://mvcsitemap.codeplex.com/wikipage?title=Dynamic%20sitemaps&amp;version=1)

I can't get the sitemap to work at all i get a value can not be null error whenever I load the page with the sitemap.

Please help, I though that the MvcSitemap would call my dynamicNodeprovider but it isn't as no beakpoints are being it in any of my two classes that I have made,

Please Help.