GithubHelp home page GithubHelp logo

maartenba / mvcsitemapprovider Goto Github PK

View Code? Open in Web Editor NEW
537.0 537.0 220.0 8.49 MB

An ASP.NET MVC SiteMapProvider implementation for the ASP.NET MVC framework.

License: Microsoft Public License

PowerShell 3.00% C# 62.32% CSS 0.77% ASP 1.25% JavaScript 0.45% Batchfile 0.08% HTML 32.13%

mvcsitemapprovider's Introduction


Hi there πŸ‘‹

My name is Maarten Balliauw (@maartenballiauw on X / @[email protected] on Mastodon).

Maarten Balliauw loves building web and cloud apps. His main interests are in .NET web technologies, C#, Microsoft Azure and application performance. He is Developer Advocate at JetBrains, creator of SpeakerTravel, and formerly founded MyGet. He's an ASP Insider and former Microsoft MVP. Maarten is a frequent speaker at various national and international events and organizes Azure User Group events in Belgium. In his free time, he brews his own beer. Maarten's blog can be found at https://blog.maartenballiauw.be.

πŸ“™ Recent blog posts

❓ Quick bits

πŸ’» Open Source

I try to contribute to various open source projects, when time allows. Here are some examples:

Feel free to reach out to me on Twitter: @maartenballiauw

mvcsitemapprovider's People

Contributors

aflatten avatar akovsh avatar chaoaretasty avatar chrisbroome avatar cori avatar cspwizard avatar danielpalme avatar davidtme avatar drewfreyling avatar eric-b avatar evereq avatar fire-eagle avatar giggio avatar ipjohnson avatar jeremydevoss avatar maartenba avatar midishero avatar nightowl888 avatar pmarflee avatar stewartr avatar trmack avatar uhaciogullari avatar waynebrantley avatar webmarco avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mvcsitemapprovider's Issues

NullReferenceException in DefaultSiteMapProvider.FindSiteMapNode

MvcSiteMapProvider.DefaultSiteMapProvider.FindSiteMapNode(HttpContext context, RouteData routeData) in c:\Projects\Codeplex\TFS10\mvcsitemap\Branches\3.1.0\src\MvcSiteMapProvider\MvcSiteMapProvider\DefaultSiteMapProvider.cs:1085
   MvcSiteMapProvider.DefaultSiteMapProvider.FindSiteMapNode(HttpContext context) in c:\Projects\Codeplex\TFS10\mvcsitemap\Branches\3.1.0\src\MvcSiteMapProvider\MvcSiteMapProvider\DefaultSiteMapProvider.cs:1047
   System.Web.SiteMapProvider.get_CurrentNode() +56
   MvcSiteMapProvider.DefaultSiteMapProvider.get_CurrentNode() in c:\Projects\Codeplex\TFS10\mvcsitemap\Branches\3.1.0\src\MvcSiteMapProvider\MvcSiteMapProvider\DefaultSiteMapProvider.cs:116
   MvcSiteMapProvider.Web.Html.SiteMapTitleHelper.SiteMapTitle(MvcSiteMapHtmlHelper helper, String templateName) in c:\Projects\Codeplex\TFS10\mvcsitemap\Branches\3.1.0\src\MvcSiteMapProvider\MvcSiteMapProvider\Web\Html\SiteMapTitleHelper.cs:0
   MvcSiteMapProvider.Web.Html.SiteMapTitleHelper.SiteMapTitle(MvcSiteMapHtmlHelper helper) in c:\Projects\Codeplex\TFS10\mvcsitemap\Branches\3.1.0\src\MvcSiteMapProvider\MvcSiteMapProvider\Web\Html\SiteMapTitleHelper.cs:35

Unfortunately, there doesn't seem to be any tags in the MvcSiteMapProvider repository (source code history seems to have been lost) so I can't get the source code for this version to see what's wrong.

Empty RouteData when using non MVC handler

I had a rather unusual case scenario where I used MapPageRoute tu simulate " restul " URL while keeping my existing WebForms pages. While creating my sitemap config file I discovered that all my parameters were lost ( besides " controller " and " action " ) even though I had them in the preserve list ( also, could you tell what's the difference between the preserve list and the inherit list... It seems to work whether I put one or the other. Maybe a little case scenario would be helpful ).

I discovered that if the handler wasn't of type " MvcHandler ", the " RouteData " parameter of the " new RequestContext " object was just a plain " new RouteData() ". The problem was that even when mapping to a WebForms page, I still needed the values of the parameters in the preserve list, but they were always empty so the generated URL was wrong, or worse, I would get a " NullReferenceException " in the " DefaultSieMapProvider ".

I modified the " UrlHelper " property to put the populated dictionary of the " Page " handler instead of the empty one. Here is a revised version of the property:

protected UrlHelper UrlHelper
{
get
{
if (HttpContext.Current.Items[UrlHelperCacheKey] == null)
{
RequestContext ctx;
if (HttpContext.Current.Handler is MvcHandler)
ctx = ((MvcHandler)HttpContext.Current.Handler).RequestContext;
else if (HttpContext.Current.Handler is Page)
//ctx = new RequestContext(new HttpContextWrapper(HttpContext.Current), new RouteData());
ctx = new RequestContext(new HttpContextWrapper(HttpContext.Current), ((Page)HttpContext.Current.Handler).RouteData);
else
ctx = new RequestContext(new HttpContextWrapper(HttpContext.Current), new RouteData());
HttpContext.Current.Items[UrlHelperCacheKey] = new UrlHelper(ctx);
}
return (UrlHelper)HttpContext.Current.Items[UrlHelperCacheKey];
}
}

Now everything works as expected

No parameterless constructor defined for this object. ??

The error only occurs on the first run.

Error

Full image: http://i.imgur.com/uRsA4.png

Error

Sitemap

<mvcSiteMapNode title="Produtos Tipo" action="ProdutoTipo" area="" controller="Produtos" dynamicNodeProvider="DataFilme.Extensibilidade.ProdutoTipoDynamicNodeProvider, DataFilme" />

ProdutoTipoDynamicNodeProvider: DynamicNodeProviderBase: http://mysticpaste.com/private/bir6Wcgbx4/

Mvc.sitemap: http://mysticpaste.com/private/RMIYh48VNZ/

If I comment out the line 9, the error does not occur!

Dynamic SiteMaps and Related Breadcrumbs - Not working reliably

I have tried for quite some time now to get Dynamic Sitemaps and the related breadcrumbs working reliably in my MVC 2 and 3 projects. I have had issues with the breadcrumbs based on the dynamic sitemap / mvcsitemapprovider disappearing randoming. I have done extensive research on the web and noticed several others have had similar issues. Unfortunately, I have not found any resolutions to this issue. I am using custom URLs that differentiate requests with URL parameters. For example, example.com/events/evt-id-123
When I don't use the parameters this is NOT an issue. When I need to use the parameters the random behavior exists. It feels like the issue might be related to CACHING so I tried to disable CACHING by setting the MVCSiteMapProvider cacheDuration=0 in the web.config but it did not make a difference. I have used the latest MVC v2 and v3 MVCSiteMapProvider builds and the issue remains. I have included code snippets from my MVC 3 project below.

Can anyone help me resolve this issue or point me to some decent documentation or articles on how to resolve this issue?

Web.config Sitemap settings

<siteMap defaultProvider="MvcSiteMapProvider" enabled="true">
  <providers>
    <clear />

    <!-- Site Map for Website BREADCRUMBS, security NOT enabled -->
    <add name="MvcSiteMapProvider"
     type="MvcSiteMapProvider.DefaultSiteMapProvider, MvcSiteMapProvider"
     siteMapFile="~/WebBreadcrumb2.sitemap"
     securityTrimmingEnabled="false"
     cacheDuration="0"
     enableLocalization="false"
     scanAssembliesForSiteMapNodes="true"
     excludeAssembliesForScan=""
     includeAssembliesForScan="ArtsDevWeb"
     attributesToIgnore=""
     nodeKeyGenerator="MvcSiteMapProvider.DefaultNodeKeyGenerator, MvcSiteMapProvider"
     controllerTypeResolver="MvcSiteMapProvider.DefaultControllerTypeResolver, MvcSiteMapProvider"
     actionMethodParameterResolver="MvcSiteMapProvider.DefaultActionMethodParameterResolver, MvcSiteMapProvider"
     aclModule="MvcSiteMapProvider.DefaultAclModule, MvcSiteMapProvider"
     siteMapNodeUrlResolver="MvcSiteMapProvider.DefaultSiteMapNodeUrlResolver, MvcSiteMapProvider"
     siteMapNodeVisibilityProvider="MvcSiteMapProvider.DefaultSiteMapNodeVisibilityProvider, MvcSiteMapProvider"
     siteMapProviderEventHandler="MvcSiteMapProvider.DefaultSiteMapProviderEventHandler, MvcSiteMapProvider"
     />
  </providers>
</siteMap>

Sitemap

<mvcSiteMapNode title="Home" controller="Home" action="Index" changeFrequency="Always" updatePriority="High" key="Home" >

    <mvcSiteMapNode title="About" controller="Home" action="About" parentkey="Home" key="About" />

    <mvcSiteMapNode title="Payment Search" controller="PaymentSearch" action="Index" parentkey="Home" key="PaymentSearch" changeFrequency="Always" updatePriority="High"  >
        <mvcSiteMapNode title="Results" dynamicNodeProvider="ArtsDevWeb.PaymentSearchResultsDynamicNodeProvider,ArtsDevWeb"
                        key="Results" changeFrequency="Always" updatePriority="High">
            <mvcSiteMapNode title="Details" dynamicNodeProvider="ArtsDevWeb.PaymentSearchDetailsDynamicNodeProvider,ArtsDevWeb"
                          key="Details" changeFrequency="Always" updatePriority="High" >

                <!-- Note title will get used from DynamicNodeProvider in sitemap-->
                <mvcSiteMapNode title="PaymentSearchLevel4" dynamicNodeProvider="ArtsDevWeb.PaymentSearchLevel4DynamicNodeProvider,ArtsDevWeb" key="PaymentSearchLevel4"  />

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

</mvcSiteMapNode>

GetDynamicNodeCollection method

    public override IEnumerable<DynamicNode> GetDynamicNodeCollection()
    {
        string payNumber = (string)HttpContext.Current.Session["strPaymentNumber"];

        //single node approach - RESULTS NODE
        DynamicNode node = new DynamicNode();
        node.ParentKey = "PaymentSearch";
        node.Key = "Results";
        node.ChangeFrequency = MvcSiteMapProvider.ChangeFrequency.Always;
        node.Attributes.Add("dynamicParameters", "searchCriteria"); 
        node.Title = "Results";
        node.Controller = "PaymentSearch";
        node.Action = "Results";
        node.RouteValues.Add("searchCriteria", payNumber);

        yield return node;

    }

If URL contains characters like 'ftp' or 'http' wrong urls are generated in Sitemap.xml

Problem: URL 'http://www.foo.de/privathaftpflichtversicherung' would result as '/privathaftpflichtversicherung' in sitemap.xml

Reason:

Class: XmlSiteMapResult.cs

Method:
protected virtual IEnumerable GenerateUrlElements(IEnumerable siteMapNodes, string url)

Line no 233:
if (siteMapNodeUrl.Contains("http") || siteMapNodeUrl.Contains("ftp"))
{
nodeUrl = siteMapNodeUrl;
}

Rather it should be something like:
if (siteMapNodeUrl.StartsWith("http") || siteMapNodeUrl.StartsWith("ftp"))
{
nodeUrl = siteMapNodeUrl;
}

Dynamic Node UpdatePriority Support

Currently DynamicNodes do not have the ability to set their update priority. Was going to add it in shortly (like I did with change freq and last modified).

I was thinking of creating an interface for the nodes that support all features of the 0.9 sitemap protocol so we don't miss this differences between the normal MvcSiteMapNode and DynamicNode?

How to generate routes from mvcsitemap?

public static void BuildUpContentRoutes(this RouteCollection routes)
{

        const string siteMapResources = "SiteMapResources";

        var rootNode = System.Web.SiteMap.RootNode as MvcSiteMapNode;

        IEnumerable<MvcSiteMapNode> children = from nodes in rootNode.ChildNodes.OfType<MvcSiteMapNode>()
                                               select nodes;

        foreach (MvcSiteMapNode siteMapNode in children)
        {
            CreateContentRoute(routes, siteMapNode);
        }
    }

The above function is called in the RegisterRoutes in Global.asax/OnApplicationStarted() .
It ends in errors. But if I put in in Application_BeginRequest it works.

Has anyone used the mvcsitemapprovider to create their routes?

Task<IEnumerable<DynamicNode>> instead of IEnumerable<DynamicNode>

While we are working with DynamicNodes, we need to create a new class which derives from DynamicNodeProviderBase abstract class. Inside that class, we need to override one method as follows:

public abstract IEnumerable<DynamicNode> GetDynamicNodeCollection();

There are some cases which takes long time for that collection to load.if there is lots of data inside the database. For example, I have one currently and it takes approx. 400 ms. I am not sure but is there a way for the future releases to make this method's return type as Task<IEnumerable<DynamicNode>> so that it doesn't have to wait, returns the result immediately and builds the sitemap on the background?

I am thinking that this would also cause some problems even if this is possible. Any idea?

Hybrid WebForms Project and SecurityTrimming

I am attempting to use the MvcSiteMapProvider in a hybrid project. I have entries like:

<mvcSiteMapNode url="~/Preferences.aspx" title="Preferences"  />

These show up fine if I disable security trimming. If I turn it on, I don't see anything. Is there a way to get this to work?

Thanks,
-Damien

Potential issue in NodeMatchesRoute in DefaultSiteMapProvider.cs

For a site map like this:



.......

........

I observed that several times when user navigates to the 'All Products' page, the link titled 'Home' is selected and not 'All Products'.
On further investigation, i see that the method NodeMatchesRoute has a possible invalid logic.
It returns true when controller attribute on SiteMapNode is blank whereas the controller in the routevalues isn't and all other (action, id and area) attributes match.
By changing the small part of the method as below, it worked:
Line 1313:
else
{
//if (pair.Value == null || string.IsNullOrEmpty(pair.Value.ToString()) || pair.Value == UrlParameter.Optional)
//{
// continue;
//}
//else if (pair.Key == "area")
//{
// return false;
//}

                        if ((pair.Value != null && !string.IsNullOrEmpty(pair.Value.ToString())
                             && pair.Value != UrlParameter.Optional) || pair.Key == "area")
                        {
                            return false;
                        }
                    }

However, I could not figure out why this issue is intermittent .

It is not possible to implement the SiteMapResolve event

Due to the caching implementation in DefaultSiteMapProvider.CurrentNode it is not possible to use the SiteMapResolve event when you have multiple calls (a menu and a path) in one view as it will only work for the first item.

Here is my implementation of the CurrentNode to fix this and still keep caching:

        /// <summary>
        /// Gets the <see cref="T:System.Web.SiteMapNode"/> object that represents the currently requested page.
        /// </summary>
        /// <returns>A <see cref="T:System.Web.SiteMapNode"/> that represents the currently requested page; otherwise, null, if the <see cref="T:System.Web.SiteMapNode"/> is not found or cannot be returned for the current user.</returns>
        public override SiteMapNode CurrentNode
        {
            get
            {
                if (HttpContext.Current.Items[currentNodeCacheKey] == null)
                {
                    var currentNode = base.CurrentNode;
                    HttpContext.Current.Items[currentNodeCacheKey] = currentNode;
                    return currentNode;
                }
                return (SiteMapNode)HttpContext.Current.Items[currentNodeCacheKey];

            }
        }

Now I can just add an event in the global.asax to do all sorts of checks like this:

        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();

            SiteMap.SiteMapResolve += new SiteMapResolveEventHandler(SiteMap_SiteMapResolve);

            RegisterGlobalFilters(GlobalFilters.Filters);
            RegisterRoutes(RouteTable.Routes);
        }

        SiteMapNode SiteMap_SiteMapResolve(object sender, SiteMapResolveEventArgs e)
        {
            if (SiteMap.CurrentNode == null)
                return null;
            MvcSiteMapNode current;
            if (SiteMap.CurrentNode is MvcSiteMapNode) {
                current = SiteMap.CurrentNode.Clone(true) as MvcSiteMapNode;
            } else {
                throw new Exception("Verkeerde sitemap?");
            }
            ...

            return current;
        }

Use also UrlAuthorizationModule.CheckUrlAccessForPrincipal

The visibility of a node can only be toggled with the AuthorizeAttribute, in our case we dont want to hardcode role access into the code, we use the location configuration like you did in Webforms

<location path="SomePath">
    <system.web>
      <authorization>
        <allow roles="SomeRole" />
        <deny users="*" />
      </authorization>
    </system.web>
  </location>

If you add UrlAuthorizationModule.CheckUrlAccessForPrincipal(url, Thread.CurrentPrincipal, "*") to your code (The VERB can be changed to Get) you will support both ways.

Thanks

Error: Filtering is not allowed.

In my action have the attribute:

Controller

[DonutOutputCache(CacheProfile = "StaticPage")]
public ActionResult Index() { return View(_context.ProdutoTipos.PaginaInicial().ToList()); }

Web.config

<caching>
    <outputCacheSettings>
    <outputCacheProfiles>
        <add name="StaticPage" duration="10" varyByParam="*" />
    </outputCacheProfiles>
    </outputCacheSettings>
</caching>

Error

System.Web.HttpException
Filtering is not allowed.

System.Web.HttpException (0x80004005): Filtering is not allowed.
at System.Web.HttpResponse.set_Filter(Stream value)
at System.Web.HttpResponseWrapper.set_Filter(Stream value)
at Cassette.Web.CassetteApplication.OnPostRequestHandlerExecute()
at Cassette.Web.CassetteHttpModule.HttpApplicationPostRequestHandlerExecute(Object sender, EventArgs e)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Advanced Node Visibility - non visible child nodes filter out a visible parent

Hi Team,

I followed this guide:

https://github.com/maartenba/MvcSiteMapProvider/wiki/Advanced-Node-Visibility

In creating a Custom SiteMapNodeVisibilityProvider. I have basically linked it into the roles mechanism in my database, so that it filters out any nodes that that particular user doesn't have permission to see.

I have noticed an issue with it however.

E.g. If my sitemap file contains the following:




If my custom SiteMapNodeVisibilityProvider determines that a child node (e.g. Claim Tracking) should not be visible, the entire parent (Claims) is no longer visible, despite this being set to visible in an earlier call to my SiteMapNodeVisibilityProvider .

My question is:

Is this by design or is this a bug?

I'm basically trying to hide certain nodes for certain user roles. Am I going about this the wrong way? Thanks.

BTW I wrote quite a popular basic tutorial on the fantastic MVCSiteMapProvider
http://edspencer.me.uk/2011/09/20/mvc-sitemap-provider-tutorial-2-breadcrumbs/

NuGet Package for MvcSiteMapProvider 3.2.2.0 .NET 4.0

The MvcSiteMapProvider.dll (installed today) in both the net35 and net40 lib folder are identical. It appears both contain the net35 code.

One of the side effects is that MvcSiteMapProviderViewEngine uses Activator.CreateInstance, instead of new to create WebFormView instances, which fails.

Performance loading sitemap on first hit

I am using a dynamic node provider which contains 6000 nodes in total. The first time a razor view is requested which contains
@Html.MvcSiteMap().SiteMapPath(), the page can take up to 7500ms to load.

The time is all taken up within this call as when profiling my code within the dynamic node provider it takes 28ms.

If I take out all of the dynamic nodes in the mvc.sitemap the code returns very quick 280ms.

Is there any way to pre-load this - I am using IIS 7 and therefore cant use the app warm up module or the new app startup warming part if IIS 7.5.

No response with version 3.2.1.0 when there is too much nodes

Did you ever experienced unresponsiveness on version 3.2.1.0? I am working with dynamicnodes and I have many links. When I update the package and fire the app, it never starts and never throw exception. To be honest, I didn't dig into it. Then reverse the update to 3.1.0.0, it went back to normal.

Performance Issue in production

Hi guys,
Hope someone can help me with this one. I have deployed an mvc 3 application and it works really slow in production.
Works fine in dev and qa. I was thinking the issue would be the load difference. Has anyone had performance issues?
The only thing the admin told me was that the server was running hard.
I have health monitoring turned on but no errors registered at this end, so I would assume there were no application errors.

Duplicate nested entries cause lockup

Having something like this in the site map will lock up the page when you select the top-level Styles. (endless recursion is my bet)

<mvcSiteMapNode title="Styles" controller="Styles" action="Index">
  <mvcSiteMapNode title="Styles" controller="Styles" action="Index"/>
  <mvcSiteMapNode title="Other" controller="Other" action="Index"/>
</mvcSiteMapNode>

Reason for me doing this is that I have to separate the top-level menu from the sub menu. So I'm rendering with @Html.MvcSiteMap().Menu(1, 1) and @Html.MvcSiteMap().Menu("SubMenuHelperModel", 2, 1)

Problem here is that if I remove the inner "Styles" entry the submenu never displays as it doesn't seem to pickup the child nodes (Model.Nodes.Count is 0). Maybe this is a separate bug.

Note that if I remove action="Index" on the inner "Styles" entry or create a unique Key it does not lockup but the Styles node will be displayed twice in the subnav (pretty sure this is an another bug since i limiting to start node level 2.

StackOverflowException occurs when cache duration is set to zero due to threading issue

I have observed occasionally server crashes due to stackoverflow exception. It happens when user navigates quickly from one sitemap to another with one sitemap cacheduration set to zero. On further investigation, i observed that when the exception occurs, the call stack is filled up with hundreds of pair of 'OnsiteMapChanged() - BuildSiteMap()'.

Since cache duration is set to 0, the callback in code in BuildSiteMap():
HttpContext.Current.Cache.Add(
cacheDescription.Key,
"",
cacheDescription.Dependencies,
cacheDescription.AbsoluteExpiration,
cacheDescription.SlidingExpiration,
cacheDescription.Priority,
new CacheItemRemovedCallback(OnSiteMapChanged));

fires immediately. Now i am guessing due to threading issue as user jumps from links to links, a potential infinite loop is created resulting into stackoverflow exception.
Please cooment on this

The latest version also has this issue.

Multiple Pages Need To Link to One Menu Node

I posted the following question about the MvcSiteMapProvider at StackOverflow but I have not been able to get any responses.
http://stackoverflow.com/questions/9945654/mvcsitemapprovider-multiple-pages-need-to-link-to-one-menu-node

Basically, I have a very simple site map, but the child nodes (such as Member Listing) disappear when I navigate to an action below them (like Detail). I want to be able to specify that for certain actions (like Detail, Edit, etc.), that the defined child nodes should still be displayed and that a certain child node (e.g. Member Listing) should be set as selected. Can anyone provide assistance with this as it seems like such a simple issue.

Problems with using ImageUrl DynamicNodeProviderBase

Apparently, the title takes the value of ImageUrl

In my DynamicNodeProviderBase class configure both the Title and the ImageUrl

DynamicNodeProviderBase

const string keyFormated = "Subsidiary_{0}";

// Create a node for each subsidiary
foreach (var subsidiary in listDB.ToList())
{
    var node = new DynamicNode
                   {
                       Title = subsidiary.District,
                       Description = subsidiary.Title,
                       ImageUrl = Path.Combine(string.Format(Constants.RelativePathSubsidiary, subsidiary.ID.ToString().ToLower())),
                       Key = string.Format(keyFormated, subsidiary.District)
                   };
    node.RouteValues.Add("id", subsidiary.ID);
    node.Attributes.Add("LargeIconFileName", subsidiary.LargeIconFileName);
    node.Attributes.Add("MediumIconFileName", subsidiary.MediumIconFileName);
    node.Attributes.Add("SmallIconFileName", subsidiary.SmallIconFileName);
    returnValue.Add(node);
}

// Return 
return returnValue;

View

In my view, call the helper to generate the menu of my page.
This menu is customized by a DisplayTemplates

@Html.MvcSiteMap().Menu("sitemap-menu", true, true, false)

DisplayTemplates

Basically have a DisplayTemplates for the MenuHelperModel and one for the SiteMapNodeModel.
As MenuHelperModel is pretty simple (just call the helper @DisplayFor passing my custom template) will not put his code here.

The following code SiteMapNodeModel

@model SiteMapNodeModel
@{

    object upper;
    string title = Model.Title;
    var imgUrl = Path.Combine(Model.ImageUrl, "Icons");
    string iconFilename;
    if (ViewData.TryGetValue("upper", out upper))
    {
        title = title.ToUpperInvariant();
    }

    if (Model.MetaAttributes.TryGetValue("SmallIconFileName", out iconFilename)
        || Model.MetaAttributes.TryGetValue("MediumIconFileName", out iconFilename)
        || Model.MetaAttributes.TryGetValue("LargeIconFileName", out iconFilename))
    {
        imgUrl = Path.Combine(imgUrl, iconFilename);
    }
}

@if (Model.IsCurrentNode && Model.SourceMetadata["HtmlHelper"].ToString() != "MvcSiteMapProvider.Web.Html.MenuHelper")
{ 
    <text>@title</text>
}
else if (Model.IsClickable && Model.ImageUrl != null)
{ 
    <a href="@Model.Url" title="@Model.Title">
        <img src="@Url.Content(imgUrl)" alt="@Model.Title"/>
        <span>@title</span>
    </a>
}
else
{ 
    <text>@title</text>
}

But the values ​​are incorrect (or are exchanged).
See a picture of the debug:

Debug

Debug mode
See full image here

Question

Why the value of the ImageUrl property is Title and why TItle is empty?

Sitemap when using same controller and action and routedata in several paths

I have seen some posts about navigation and breadcrumbs but did not find the exaxt same problem. However if there is, please forgive and point me to it. Thank you.

[EDIT: Better explaining what I need to do]
My case :

Interests                   Profiles
|                       |
|_Interest Area 1               |-Profile Area 1
|   |                       |
|   |_Interest Area 1.1             |_List of Books
|       |                       |
|       |_List of Books                 |_Book Detail
|           |
|           |_Book Detail
|_Interest Area 2
    |
    |_List of Books
        |
        |_Book Detail

The hierarchy is stored in the database. The entry points Interests and Profiles are fixed. From there I don't know what the children will be.

When there is no child left anymore, the books get retrieved based on the value of the last selected (sub)category.

I have two problems here:
1st: Creating the appropriate routes. The way I would like it is:

/books/{id}/{interestareaname}/{subinterestareaname}/{books}/{page}

where interestareaname is added for user friendly urls and keeps getting repeated as long you go down the hierarchy. The output would then be:
/books/1/project-management/prince2/books/1
this shows the prince2 books on paged listpage page 1.

But when there is only one level it the route contains only one interestareaname and thus becomes this:

/book/{id}/{interestareaname}/{books}/{page}

What I did to solve problem number 1:
created routes for each level:

    routes.MapRoute(
        "Details",
        "book/details/{id}/{booktitle}",
        new { controller = "book", action = "Details", id = "*", booktitle= "*" }
    );

    routes.MapRoute(
        "level3",
        "book/{id}/{level1}/{level2}/{level3}/{page}",
        new { controller = "book", action = "books", level1 = "*", level2 = "*", level3 = "*", id = "0", page = 0 }
    );
     routes.MapRoute(
        "level2",
        "book/{id}/{level1}/{level2}/{page}",
        new { controller = "book", action = "books", level1 = "*", level2 = "*", level3 = "*", id = "0", page = 0}
    );

    routes.MapRoute(
        "level1",
        "book/{id}/{level1}/{page}",
        new { controller = "book", action = "books", level1 = "*", level2= "*", level3 = "*", id = "0", page = 0}
    );

I got to this by stating that a max level should be set. That is only because I didnt know how to make it more dynamic.

The problem now is to differentiate between the interests categories and the profile categories. With profiles I would like to go the same path and same url constructions but now for profile categories.

The 2nd problem I have is the sitemap and the breadcrumbs.
I have tried only with interests to create dynamically the nodes. I used the MVCsitemapprovider and the DynamicNodes functionality.

This caused for me the problem that when I reached the lowest level, it did show the list with the correct breadcrumb. But when clicking on page 2 of my paged list, the breadcrumb was empty. And yet the route is correct, since the page does show the correct data.

With the sitemap I also have a problem showing the details page. Because the books will appear both on profiles and on interests. And some books will appear in multiple interest areas or profiles.
In each case I would like to see the path I used to get to that book.

I have spent now many nights and I still canΒ΄t figure it out. If some one can help or point me to the right direction I am very grateful.

MvcSiteMap version 3.2 is not pulling/evaluating MvcSiteMapTitleKey value from view Data

I had setup mvc sitemap version 3.1 RC and it is working absolutely fine but when I upgrade it to the assembly version 3.2 it doesn't pull MvcSiteMapTitleKey value from ViewData. We had setup the MvcSitemap with following information:

Action Method:

[SiteMapTitle("MvcSiteMapTitleKey")]
public ActionResult CompareMonths(string firstMonth, string secondMonth)
{
ViewData["MvcSiteMapTitleKey"] = String.Format("Compare {0} to {1}", model.Month1.MonthYearDisplay, model.Month2.MonthYearDisplay);
return View(model);
}
[SiteMapTitle("MvcSiteMapTitleKey")]
public ActionResult CompareYears(string firstMonth, string secondMonth)
{
ViewData["MvcSiteMapTitleKey"] = String.Format("Compare {0} to {1}", model.Month1.MonthYearDisplay, model.Month2.MonthYearDisplay);
return View(model);
}

mvc.sitemap

<mvcSiteMapNode title="Budget" action="Budget">
<mvcSiteMapNode action="CompareMonths" changeFrequency="Always" updatePriority="Normal" />
<mvcSiteMapNode action="CompareYears" changeFrequency="Always" updatePriority="Normal" />
</mvcSiteMapNode>

Error when calling any method, on Mvc3 with razor

I just added MvcSiteMapProvider through nuget.

I added some dynamic nodes in code, being careful to have only 1 root node (without parent key) and removed the sitemap file declaration in web config.

In my _layout.cshtml I call:

@Html.MvcSiteMap().Menu()

and I get the following:

The view at '~/Views/Shared/DisplayTemplates/MenuHelperModel.ascx' must derive from ViewPage, ViewPage, ViewUserControl, or ViewUserControl.

I'm not even using ascx views since my project uses razor. If I delete the ascx views, I still get the same error, still on the ascx views.

Strange thing I used this library many times before and never had such a problem.

Caching per-user

Hi. Actually it is not an issue - it is a question and feature request :)

The question is: Is it possible to set cache behavior as session (not cache), or maybe remove it at all using config file?
If it is not - How can I do this in code?

The reason is why I am asking is that I need to show different menus for different users. And the reason why I can not use Acl - I use customer remote web services, that show me only items user have access to.

So I need to remove cache (which is bad, but acceptable if there is no other way), or use session as a cache. Is it possible?

The feature request: If currently it is impossible - can you add this feature?

Issue with RootNode having no children after BuildSiteMap

For some reason I am having problems with no children in the root node.

The issue is

When building the site map it contains the root nodes and all it's children. for example I had something like this


<mvcSiteMapNode controller="Home" action="Index" title="Homepage" />

It will show up the Test MvcSiteMapNode, but the children after the final isBuildingSiteMap = false; on line 606... BEFORE it calls this, root has ChildNodes, after it calls it it (even added a simple variable to put a break through...) to see if it was somethign to do with thread lock but its not...

What is wrong?

HtmlHelper Menu performance has drastically degraded since 3.1.0

The following method now takes about 6 times longer than it did in version 3.1.0

   public static MvcHtmlString Menu(this MvcSiteMapHtmlHelper helper, string templateName, SiteMapNode startingNode, bool startingNodeInChildLevel, bool showStartingNode, int maxDepth, bool drillDownToCurrent)
    {
        var profiler = MiniProfiler.Current;
        using (profiler.Step("MvcSitemap Menu"))
        {
            var model = BuildModel(helper, startingNode, startingNodeInChildLevel, showStartingNode, maxDepth, drillDownToCurrent);
            return helper
                .CreateHtmlHelperForModel(model)
                .DisplayFor(m => model, templateName);
        }
    }

Constructor on type 'System.Web.Mvc.WebFormView' not found

I am using .Net Framework 4 and am deploying to an IIS7 server using a web installer package. When I do I get the error below. I think it has something to do with the GAC as I get the same error if I copy the contents of the bin folder in dev to qa.

[MissingMethodException: Constructor on type 'System.Web.Mvc.WebFormView' not found.]
System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +12738733
MvcSiteMapProvider.Internal.MvcSiteMapProviderViewEngine.CreatePartialView(ControllerContext controllerContext, String partialPath) +95
System.Web.Mvc.VirtualPathProviderViewEngine.FindPartialView(ControllerContext controllerContext, String partialViewName, Boolean useCache) +245
System.Web.Mvc.ViewEngineCollection.Find(Func2 lookup, Boolean trackSearchedPaths) +176 System.Web.Mvc.Html.TemplateHelpers.ExecuteTemplate(HtmlHelper html, ViewDataDictionary viewData, String templateName, DataBoundControlMode mode, GetViewNamesDelegate getViewNames, GetDefaultActionsDelegate getDefaultActions) +511 System.Web.Mvc.Html.TemplateHelpers.TemplateHelper(HtmlHelper html, ModelMetadata metadata, String htmlFieldName, String templateName, DataBoundControlMode mode, Object additionalViewData, ExecuteTemplateDelegate executeTemplate) +1365 System.Web.Mvc.Html.TemplateHelpers.TemplateHelper(HtmlHelper html, ModelMetadata metadata, String htmlFieldName, String templateName, DataBoundControlMode mode, Object additionalViewData) +110 System.Web.Mvc.Html.TemplateHelpers.TemplateFor(HtmlHelper1 html, Expression1 expression, String templateName, String htmlFieldName, DataBoundControlMode mode, Object additionalViewData) +158 System.Web.Mvc.Html.DisplayExtensions.DisplayFor(HtmlHelper1 html, Expression1 expression, String templateName) +108 ASP._Page_Views_Shared__ManagementMaster_cshtml.Execute() in c:\inetpub\wwwroot\PnV\Views\Shared\_ManagementMaster.cshtml:10 System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +280 System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +103 System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +196 System.Web.WebPages.WebPageBase.RenderSurrounding(String partialViewName, Action1 body) +209
System.Web.WebPages.WebPageBase.PopContext() +201
System.Web.WebPages.WebPageBase.RenderSurrounding(String partialViewName, Action1 body) +209 System.Web.WebPages.WebPageBase.PopContext() +201 System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +380 System.Web.Mvc.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() +33 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func1 continuation) +613
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +263
System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +691
System.Web.Mvc.Controller.ExecuteCore() +162
System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +305
System.Web.Mvc.<>c__DisplayClassb.b__5() +62
System.Web.Mvc.Async.<>c__DisplayClass1.b__0() +20
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +469
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +375

Problems using SiteMapPath

Hi,

I'm taking a problem with SiteMapPath when I try to use the same action and controller twice or more in different place.

What exactly I wanna do is:

home -> users -> insertion of user -> search of people

home -> users -> edition of user -> search of people

But it doesnt matter if Im on "search of people" from "edition of user" or " insertion of user", the SiteMapPath always shows the first path (home -> users -> insertion of user -> search of people), because it comes first on the "Mvc.sitemap" file. Is there a alternative for this issue?

Thaks!

PreservedRouteParameters only preserving Url segments not query string

I have an action method that looks like this:

public ActionResult Details(int id, int feedId, int columnId)

I would like for all parameters, including "id", "feedId", and "columnId" to be part of the Url when this particular node appears in cookie crumbs. However, the problem seems to be that when the Url is being resolved in DefaultSiteMapNodeUrlResolver, the values for "feedId" and "columnId" are not part of the RouteData.Values collection. They are however part of Request.Uri. I made a quick hack that in addition to looking for a preservedParameterName value in the RouteData object it also looks at the Request.QueryString collection. This seems to work, however it is a hacky.

Use DependencyResolver

Everywhere, where it's needed to create new object, use DependencyResolver.GetService(...) instead of Activator.CreateInstance(...). This will help to integrate it with IoC frameworks

Poor AuthorizeAttributeAclModule performance

The following line of code within AuthorizeAttributeAclModule.cs caused a significant performance problem for me when rendering menus.

            controllerContext.Controller = ControllerBuilder.Current.GetControllerFactory().CreateController(requestContext, controllerName) as ControllerBase;

I guess it must be attempting to retrieve the attributes every time the menu is rendered instead of caching them.

I also noticed the same module performed about 6 times quicker in version 3.1.0. (found this by profiling the wrong version of code).

Fortunately for me, the feature had been turned on by accident and wasn't required.

Use GET to determine node accessibility

I have two actions with the same name: one for GET requests and another one for POST. These action have require different user roles (the user must have write access for POST).

AuthorizeAttributeAclModule uses current HTTP method to determine the action so users without write access don't have the site map node after they POST on some other page. This is not right because following links in a site map generates GET requests.

I think HTTP method should be configurable or GET.

Hybrid MVC Project, Breadcrumbs, and Parent WebForm Node

I am working in an ASP.NET WebForm project where I've integrated ASP.NET MVC. I am using the MvcSiteMapProvider mainly for breadcrumbs. Within my sitemap, my MVC page is listed as a child of a WebForms page. The WebForms page requires an id parameter to be passed to it. Right now I'm just using the Edit controller method, so I simply set the parent node url within the action (I found this in the old Codeplex issues) like so:

SiteMap.CurrentNode.ParentNode.Url = string.Format("~/Company.aspx?id={0}", id);

Seems like a good solution, but it only occasionally works. Sometimes I get correct id, somethings I get an incorrect one (like an old ID) and sometimes I don't get the querystring at all. Here's the sitemap snippet

<mvcSiteMapNode url="~/Companies.aspx" title="Companies"">
    <mvcSiteMapNode url="~/Company.aspx" title="Company Detail" >
          <mvcSiteMapNode title="Company Edit" controller="Company" action="Edit"/>
     </mvcSiteMapNode>
</mvcSiteMapNode>

I figured that it might be a cache issue, so I tried setting the cacheduration to 0 in the web.confg, but it didn't seem to do anything. I'm hoping it's something obviously that I am missing here.

Thanks for your help,
-Damien

Visibility Filters

I'm trying to filter out some of the dynamic pages, but I want them to show up for the XML output.

I'm using

Which is working great for the most part, except on the sitemap.xml I want them all to show up.

I've tried many other options to put in for the visibility, but cannot seem to come up with the correct name.

DynamicNodeProviderBase and Globalization

I have the following class

public class MenuVeiculo
{
    public string Nome { get; set; }
    public string NomeEn { get; set; }
    public Guid ID { get; set; }
}

As you can see, I have two properties, "Nome" and "NomeEn." Each one represents the name and the name in English.

Mvc.sitemap

<mvcSiteMapNode key="MenuVeiculo" dynamicNodeProvider="Semep.Extensibilidade.SiteMap.MenuVeiculoDynamicNodeProvider, Semep" title="Menu veiculo" action="Index" controller="Rental">

MenuVeiculoDynamicNodeProvider.cs

public class MenuVeiculoDynamicNodeProvider : DynamicNodeProviderBase
{
    public override IEnumerable<DynamicNode> GetDynamicNodeCollection()
    {
        var context = DependencyResolver.Current.GetService<SemepContext>();
        var listDB = (from p in context.MenusVeiculo
                        select new
                                    {
                                        p.Nome,
                                        p.ID
                                    });

        const string keyFormat = "MenuVeiculo_{0}";
        foreach (var menu in listDB.ToList())
        {
            var key = string.Format(keyFormat, menu.ID.ToString().ToUpper());
            var root = new DynamicNode(key, menu.Nome)
                            {
                                Title = menu.Nome
                                ,
                                Key = key
                            };
            root.Attributes.Add("id", menu.ID.ToString());
            root.RouteValues.Add("id", menu.ID);
            yield return root;
        }
    }

    #endregion
}

Question

My question is, how to work with multi-language and DynamicNodeProviderBase? As you can see, there are two fields, and I'm only showing one. A problem of "Thread.CurrentThread.CurrentCulture" is that the MvcSiteMapProvider caches the result, how to handle this:

Same question in Stackoverflow Question

Unexpected behavior (@Html.MvcSiteMap().Menu(...))

I have SiteMap like this:
Item 1
-- Itam 1.1
-- Item 1.2
-- Item 1.3
Item 2
-- Itam 2.1
-- Item 2.2
-- Item 2.3

When I append @Html.MvcSiteMap().Menu(2 1) result is
-- Itam 2.1
-- Item 2.2
-- Item 2.3
BUT when I call this method with template name parameter: @Html.MvcSiteMap().Menu("SubMenu", 2 1)
Reult is
-- Item 2
-- Itam 2.1
-- Item 2.2
-- Item 2.3

It looks very strange. I expected to see such result as in the first case.

I found solution for myself: @Html.MvcSiteMap().Menu("SubMenu", 2, true, false, 1)

Problems with using SiteMapPath

On my site I have the following structure:

  • Product Type
    • Product Category
      • Product

Suppose that I have a product with the following characteristics:

Product XYZ

  • TypeLink: "type-xyz"
  • CategoryLink: "category-xyz"
  • Link: "product-xyz"
    ...

The url would be for a product: /produto/type-xyz/product-xyz#category-xyz

Note that the category is nothing more than a hash in Url!

Route

Follows the definition of routes

http://mysticpaste.com/private/kXhF9FFLbw/

Attention: The routes are working perfectly! I'm listing just to show better the understanding

Sitemap

To display sitemap using the following command:

@Html.MvcSiteMap().SiteMapPath()

Dynamic

Product Types: http://mysticpaste.com/private/yzOR1d0kr9/

Product Categories: http://mysticpaste.com/private/YzWvrYOt6J/

Products: http://mysticpaste.com/private/eDbfxmWAXU/

Mvc.sitemap

http://mysticpaste.com/private/2PztbFuDIs/

If you need the complete code of the sitemap: http://mysticpaste.com/private/JPKOg1a6g9/

Web.config

http://mysticpaste.com/private/8WpRGvc7Cq/

Problem

My problem is that the sitemap is not displaying the titles and links correctly!
This site is published in this link. http://datafilme.bindsolution.com/
As an example, you can open the product page "Website da Datafilme"

http://datafilme.bindsolution.com/Produto/software/website-da-datafilme

As you can see, the link is correct!
But the sitemap display data from another product!

How to integrate MvcsiteMapProvider with Telerik?

I am using Telerik Menu control in a MVC 3 razor project and like to integrate this component into my project. Would you please let me know how I can do it. Also I like to know how your security trimming works with Telerik Menu's security trimming. I mean is there any way to use your security trimming and turn off the Telerik's one!

Also I'd like to break down the sitemap file to multiple files as I am using different areas and like to have a separate sitemap file for each of the sreas!

Localized Site Map does not work after switching Culture

Using the MvcSiteMapProvider I can get all my nodes to localize just fine. However whenever I switch the UI Culture within my web application, eg changing URL from /en/app to /es/app and using the MenuHelperModel to build a menu of nodes I can see the IsCurrentNode and IsinCurrentPath no longer work. They work before the culture switch but after they do not. If I touch the web.config or sitemap file this will cause the cache to be flushed and a refresh of the current culture will make it start working but when I switch to the other it no longer works. This seems to have to do with the cache of the sitemap file.
My sitemap file has elements like:

Current node wrong when differentiate by route data

If you have multiple site mvcSiteMapNodes for the same Controller and Action but have different route values then the Current Node is calculated wrongly. Take a single Controller with two different Actions repeated but with custom RouteData of "type" which varies, the Current Node will always be for the first type.

<mvcSiteMapNode title="Home" controller="Home" action="Index">
<mvcSiteMapNode title="Page Action1 Type1" controller="Controller" action="Action1" type="Type1">
<mvcSiteMapNode title="Page Action2 Type1" controller="Controller" action="Action2" type="Type1" />
</mvcSiteMapNode>
<mvcSiteMapNode title="Page Action1 Type2" controller="Controller" action="Action1" type="Type2">
<mvcSiteMapNode title="Page Action2 Type2" controller="Controller" action="Action2" type="Type2" />
</mvcSiteMapNode>
</mvcSiteMapNode>

CurrentNode will always be Type1 even when selecting Type2

How to add a node to the Dynamic Node Provider?

I have implemented a dynamic node provider by specifying the node provider name in a mvcSiteMapNode in the SiteMap file and it works fine. However, I only want to add the dynamic nodes once the user has authenticated. I am using security trimming The reason being is that I want to access the HttpContext.User.Identity so that I can filter the nodes selected by the node provider by the userID. So, i have removed the mvcSiteMapNode in the SiteMap file and calling the GetDynamicNodeCollection method in an Action method.

In my ActionResult, I get the nodes like : ForumNodeProvider prov = new ForumNodeProvider();
var nodes = prov.GetDynamicNodeCollection();

My question: Once I have got the nodes, how do I add them to the SiteMapNodeCollection so that they are displayed in the view that is returned from the ActionResult?

url rewrite and mvcsitemap causing Exception...sometimes

I'm using IIS URL Rewrite to rewrite "/about" to "/home/about". On Mvc.sitemap I'm using:

mvcSiteMapNode url="/about" title="About" controller="Home" action="About" /

I all works fine for a while and after an hour or two I get:

System.Web.HttpException: Cannot use a leading .. to exit above the top directory.

@Html.MvcSiteMap().Menu(false, true, true)

Then I have to recycle AppPool on IIS and it all works fine again...for a while.

Any ideas? Thanks in advance.

Stack Trace:

[HttpException (0x80004005): Cannot use a leading .. to exit above the top directory.]
System.Web.Util.UrlPath.ReduceVirtualPath(String path) +11495983
System.Web.Util.UrlPath.Reduce(String path) +171
System.Web.VirtualPath.Combine(VirtualPath relativePath) +214
System.Web.VirtualPathUtility.Combine(String basePath, String relativePath) +158
System.Web.Mvc.PathHelpers.GenerateClientUrlInternal(HttpContextBase httpContext, String contentPath) +385
System.Web.Mvc.UrlHelper.GenerateUrl(String routeName, String actionName, String controllerName, RouteValueDictionary routeValues, RouteCollection routeCollection, RequestContext requestContext, Boolean includeImplicitMvcValues) +257
MvcSiteMapProvider.DefaultSiteMapNodeUrlResolver.ResolveUrl(MvcSiteMapNode mvcSiteMapNode, String area, String controller, String action, IDictionary2 routeValues) +1034 MvcSiteMapProvider.MvcSiteMapNode.get_Url() +323 MvcSiteMapProvider.AuthorizeAttributeAclModule.IsAccessibleToUser(IControllerTypeResolver controllerTypeResolver, DefaultSiteMapProvider provider, HttpContext context, SiteMapNode node) +135 MvcSiteMapProvider.DefaultAclModule.IsAccessibleToUser(IControllerTypeResolver controllerTypeResolver, DefaultSiteMapProvider provider, HttpContext context, SiteMapNode node) +216 MvcSiteMapProvider.DefaultSiteMapProvider.IsAccessibleToUser(HttpContext context, SiteMapNode node) +349 MvcSiteMapProvider.Web.Html.MenuHelper.BuildModel(MvcSiteMapHtmlHelper helper, SiteMapNode startingNode, Boolean startingNodeInChildLevel, Boolean showStartingNode, Int32 maxDepth, Boolean drillDownToCurrent) +361 MvcSiteMapProvider.Web.Html.MenuHelper.Menu(MvcSiteMapHtmlHelper helper, String templateName, SiteMapNode startingNode, Boolean startingNodeInChildLevel, Boolean showStartingNode, Int32 maxDepth, Boolean drillDownToCurrent) +87 MvcSiteMapProvider.Web.Html.MenuHelper.Menu(MvcSiteMapHtmlHelper helper, SiteMapNode startingNode, Boolean startingNodeInChildLevel, Boolean showStartingNode, Int32 maxDepth, Boolean drillDownToContent) +40 MvcSiteMapProvider.Web.Html.MenuHelper.Menu(MvcSiteMapHtmlHelper helper, Boolean startFromCurrentNode, Boolean startingNodeInChildLevel, Boolean showStartingNode) +86 ASP._Page_Views_Shared__SfMaster_cshtml.Execute() in c:\webmaster\projects\jclcorp\jclcorpmvc\Views\Shared\_SfMaster.cshtml:22 System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +280 System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +104 System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +173 System.Web.WebPages.WebPageBase.Write(HelperResult result) +89 System.Web.WebPages.WebPageBase.RenderSurrounding(String partialViewName, Action1 body) +234
System.Web.WebPages.WebPageBase.PopContext() +222
System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +384
System.Web.Mvc.<>c__DisplayClass1c.b__19() +33
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func1 continuation) +798756 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList1 filters, ActionResult actionResult) +265
System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +798832
System.Web.Mvc.Controller.ExecuteCore() +159
System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +335
System.Web.Mvc.<>c__DisplayClassb.b__5() +62
System.Web.Mvc.Async.<>c__DisplayClass1.b__0() +20
System.Web.Mvc.<>c__DisplayClasse.b__d() +54
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +469
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +375

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.225

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.