Where do I find a full tutorial, including all steps?

Mar 16, 2011 at 8:10 PM

Ok, I have done the following:

  1. Registered the provider exactly like it shows on the homepage.
    1. copied the dll and pdb into the bin folder
    2. copied the example node into my web.config exactly
  2. Created Mvc.Sitemap and placed in root of project (right next to web.config)
    1. changed the schema to 3.0.
    2. left a home node with two subs (help and about)
  3. Edited my _Layout.cshtml with @Html.MvcSiteMap().Menu()

When I execute, my view errors with the method above highlighted and the following error:

  • MvcSiteMapException was unhandled by user code
    • An error occured while building the sitemap... Check the InnerException for more details.
      • InnerException: Use the "new" keyword to create an object instance.
      • InnerException: Check to determine if the object is null before calling the method.

FWIW: I downloaded the Music Store (2.0) source/tutorial and could not find a single reference to sitemap.

Mar 17, 2011 at 4:53 PM

I had the same error by following the basic tutorial on the homepage.

The solution for me was in this thread: http://mvcsitemap.codeplex.com/discussions/239897 

to change line 2 in the "Creating a first sitemap"  from

<mvcSiteMap xmlns="http://mvcsitemap.codeplex.com/schemas/MvcSiteMap-File-2.0" enableLocalization="true"> 


mvcSiteMap xmlns="http://mvcsitemap.codeplex.com/schemas/MvcSiteMap-File-3.0" enableLocalization="true">

Mar 25, 2011 at 10:09 PM

Updated that one. Thanks for mentioning!

Aug 18, 2013 at 6:34 PM
An updated tutorial for version 4.0 can be found at the following location: http://www.shiningtreasures.com/post/2013/08/07/MvcSiteMapProvider-40-a-test-drive