You must have SiteMap defined with key "MvcSiteMapProvider" in ViewData dictionary.

Jul 28, 2011 at 7:39 PM

I have looked over the web at this specific issue and seems to be pointing back to here...

I am using MVC3 with VisualStudio 2010 and the Telerik MVC extensions. I am also using the lateste stable version of the MVC Site Map Provider from CodePlex.

I cannot create a menu control from the above objects...

I am simply trying to use the MvcSiteMapProvider with the Telerik menu control. What am I doing wrong in the code? How can I accomplish this?

I have my code set up as the following. Notice boldfaced lines...

  • Global.asax.cs
  • protected void Application_Start()
                XmlSiteMapController.RegisterRoutes(RouteTable.Routes); // register sitemap for search engine indexing
  • Mvc.sitemap file on root of project
  • <?xml version="1.0" encoding="utf-8" ?>
    <mvcSiteMap xmlns="" enableLocalization="true">
      <mvcSiteMapNode title="Home" controller="Home" action="Index" changeFrequency="Always" updatePriority="Normal">
        <mvcSiteMapNode title="Testimonials" controller="Home" action="Testimonials" />
        <mvcSiteMapNode title="Customer Info" controller="Customer" action="Index" />
        <mvcSiteMapNode title="Contact Us" controller="Home" action="About" />
        <mvcSiteMapNode title="Make a Payment" controller="Home" action="Payment" />
        <mvcSiteMapNode title="Sitemap" controller="Home" action="Sitemap" />

  • Views/Shared/_Layout.cshtml
  • <!DOCTYPE html>
        <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
        <script src="@Url.Content("~/Scripts/jquery-1.4.4.min.js")" type="text/javascript"></script>
        @(Html.Telerik().StyleSheetRegistrar().DefaultGroup(group => group.Add("telerik.common.css").Add("telerik.windows7.css").Combined(true).Compress(true)))</head>
        <div class="page">
            <div id="header">
                <div id="title">
                        YeagerTech Consulting, Inc.</h1>
                        The Trusted Source for Quality Microsoft ASP.Net Projects</h2>
                <div id="logindisplay">
                        .Items(menu => {
                            menu.Add().Text("Home").Action("Index", "Home");
                            menu.Add().Text("Testimonials").Action("Testimonials", "Home");
                            menu.Add().Text("Customer").Action("Index", "Customer");
                            menu.Add().Text("Contact Us").Action("About", "Home");
                            menu.Add().Text("Make a Payment").Action("Payment", "Home");
                            //menu.Add().Text("Sitemap").Action("Sitemap", "Home");
            <div id="main">
                <div id="footer">
        @(Html.Telerik().ScriptRegistrar().DefaultGroup(group => group.Combined(true).Compress(true)))</body>
Aug 26, 2011 at 1:33 PM

Not sure, but the Telerik menu doesn't use ASP.NET sitemaps but their own implementation. See