Showing Admin Menu on Page Refresh(Ctrl + F5)

Aug 31, 2010 at 1:17 PM

Hello Guys,

I am using BlogEngine project in my project and i had a issue, after login when user clicks on Blog tab it will open the blog site but didn't show blog Admin menu. If we do Crlt+F5 in the URL then will show the admin menu to user?

Detail of error:

1. In menu.ascx.cs page BindMenu() function is called on Page_Load.

2. In this BindMenu() function, it is reading a "SecuritySiteMap" whose code is written this way

SiteMapNode root = SiteMap.Providers["SecuritySiteMap"].RootNode;

3. When first time page loads in root object root.ChildNodes  has count = 0

4. But when we do Ctrl + F5 then in this root object count becomes 12 and shows the Admin Menu.

5. I have debugged whole code by putting break points but didn't find any solution except the SiteMap Provider settings in Web.Config file, which i have already modified but didn't find any solution.

Default SiteMap Settings in Web.Config:

 <siteMap defaultProvider="PageSiteMap" enabled="true">
      <providers>  

<add name="PageSiteMap" description="The site map provider that reads in the .sitemap XML files." type="BlogEngine.Core.Web.Controls.PageSiteMap, BlogEngine.Core"/>
<add name="SecuritySiteMap" description="Used for authenticated users." type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" securityTrimmingEnabled="true" siteMapFile="Web.sitemap"/>


      </providers>
    </siteMap>

My Modified Settings In Web.Config:

 <siteMap defaultProvider="SecuritySiteMap" enabled="true">
      <providers>
          <add name="SecuritySiteMap" description="Used for authenticated users." type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" securityTrimmingEnabled="true" siteMapFile="Web.sitemap"/>
          <add name="PageSiteMap" description="The site map provider that reads in the .sitemap XML files." type="BlogEngine.Core.Web.Controls.PageSiteMap, BlogEngine.Core"/>
      </providers>
    </siteMap>

 

Anybody faced this type of problem then please help me?

 

Thanks

Charanjot