Wednesday, April 11, 2012

Inside the MvcSiteMapProvider - Part 5: The ISiteMapNodeUrlResolver

The ISiteMapNodeUrlResolver defines how URLs are resolved. The default URL resolver are fine most of the time, as it uses the different ways to resolve URLs built-in to ASP.NET MVC. But sometimes it is necessary to create a custom resolver, for example if all URL are required to be lower or upper case. In this post I’ll try to explain exactly how the default resolver works and how to implement a custom resolver.

Tuesday, April 10, 2012

Inside the MvcSiteMapProvider - Part 4: The IAclModule

The IAclModule extension point in , are just like the ISiteMapVisibilityProvider very useful and easily implemented. It allows you to control which nodes are accessible to users. The default module checks for [Authorize] attributes on action methods and the roles attribute defined in the sitemap XML. The documentation lacks some information about the role attribute, and some about the creation of the actual module, this will be addressed in this post.

Monday, April 9, 2012

Inside the MvcSiteMapProvider - Part 3: The ISiteMapVisibilityProvider

This part is all about the ISiteMapVisibilityProvider in the . The usage is well described on the wiki page, and is very easy to use.
Ever wanted to only show specific sitemap nodes to authenticated users or only unauthenticated? With a specific role? All this can be done in 5 minutes with the ISiteMapVisibilityProvider.

Wednesday, April 4, 2012

Inside the MvcSiteMapProvider - Part 2: Dynamic node providers

Dynamic node providers gives you the ability to add dynamically generate nodes to the sitemap, fx. pages generated from a database. This is one of the most used extension points in the , and it is also easy to implement.

Inside the MvcSiteMapProvider - Part 1

I have recently worked a lot with the MvcSiteMapProvider, a great project created by Maarten Balliauw, which greatly simplifies navigation and sitemap.xml generation. But how is it done? This is of great importance to good performance, wrongly implemented it can make you site pretty slow.
Because of this I decided to create a series of in-depth posts about the internals of the MvcSiteMapProvider, and give some advices on how to improve performance. The first part is about how the main part of the provider is implemented.