Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8859511
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T15:04:50+00:00 2026-06-14T15:04:50+00:00

tl;dr: Menu from MvcSiteMapProvider sometimes fails to render itself after an application comes back

  • 0

tl;dr: Menu from MvcSiteMapProvider sometimes fails to render itself after an application comes back online, even though the code runs and the menu renders after a page refresh.

I am using the MvcSiteMapProvider in an ASP.NET MVC 3 project, and occasionally after switching the app from offline to online (by inserting a an App_Offline.htm file into the server’s root and removing it) the menu will not render anything until the page is refreshed.

I am using a custom DynamicNodeProvider to query out menu items from a database, and then render the menu. While debugging, I can see that this code is indeed running before the page loads, but no menu is rendered on the page. I have the cache set to several hours, and am using a custom cache key to allow invalidation after certain actions.

Unfortunately I cannot get this error to reproduce consistently. I can however get it to reproduce more frequently if I add a sleep at the top of the DynamicNodeProvider–it will fail about 60-70% of the time with a sleep of 30+ seconds. My best guess so far is that it has to do with the caching mechanism because setting my cache duration to 0 seems to make it so that there is no problem, and the menu always pops up. However, it’s difficult to say for sure, as the problem is difficult to pin down. Leaving it at 0 wouldn’t be an acceptable solution because of the performance drag.

What could be the root cause of this problem? Has anyone seen this behavior before or have a workaround?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T15:04:51+00:00Added an answer on June 14, 2026 at 3:04 pm

    MvcSiteMapProvider is bitten by the ASP.NET SiteMapProvider’s threading model from time to time, especially when having larger sitemap definitions. Currently there’s no workaround for this behaviour, but I’m planning on doing a rewrite (and ditching the ASP.NET SiteMapProvider dependency) to make it more stable under heavy conditions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing android application in which i have to open option menu from
How do I display a common window's menu from .Net code, the one that
I add menu's in my application dynamically depending on the values i get from
In our application we're using jdMenu plugin to create a hierarchical menu from nested
After changing a menu from a regular select to a jQuery selectmenu, I can
I use this code to iterate through native Windows Explorer menu from C#. this
I am trying to make menu from the code. I want to know what
I took some sample code to create a drop down menu from this website:
I am trying to remove project menu from menubar dynamically, means using code. Please
I am using the css/javascript drop-down menu from this page: http://javascript-array.com/scripts/simple_drop_down_menu/ Though I would

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.