472,958 Members | 2,263 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,958 software developers and data experts.

Problem attaching Custom SiteMapProvider that is not Static

Is it a problem to attach Non-static site map providers under one that
inherits from StaticSiteMapProvider ?

We are implementing a custom site map provider for a website that is being
converted to ASP.NET 2.0. The conversion is going well because some of the
features, like Master Pages and Site Maps, of ASP.NET 2.0 allow us to migrate
away from a "top frame" style of navigation to a standard dynamic cascading
top menu with minimal coding on our existing pages. We already have a rather
complex database that contains our entitlements (or roles) that we need to
leverage in a custom site map provider, but we wanted to replace our existing
hard-coded home page links with a top-level XmlSiteMapProvider which appears
to have most of the features that we need.

So our Site map will be

XmlSiteMapProvider (that references nodes and ...)
-One or more CustomSiteMapProviders

However, the two SiteMapProviders that we will be working with
(XmlSiteMapProvider with securityTrimming ON and our CustomSiteMapProvider
that loads links from the database) use different paradigms for loading their
site maps. The XmlSiteMapProvider (inherits from StaticSiteMapProvider)
loads from the sitemap config file initially into a static representation of
the data. The Custom SiteMapProvider dynamically loads the links from the
database seperately for each user and stores each user's sitemap temporarily
in the cache. The reason for this is that the business logic for getting the
links for each user within this provider are implemented in the data-layer
and are rather complex. (not a simple role-based access scenario). Trying
to unravel these entitlements into a list of roles for each of these links
will introduce a lot of complexity and also exceed the number of nodes that
are recommended for use with the XmlSiteMapProvider and securityTrimming.

What we are confused about is how this is handled by the XmlSiteMapProvider.
Although the source for this provider is posted on MSDN (see ScottGu's Blog)
it is also not the "FULL" source in that it does not divulge how the
XmlSiteMapProvider attaches to other child providers except for other
XmlSiteMapProviders. It looks like when it builds the sitemap for it's child
providers, it checks [EnsureChildProvidersUpToDate()] to see if the root node
[GetRootNodeCore()] for each child provider has changed since the last
traversal. If so, then it seems to rebuild the child provider and re-attach
it to it's static site map structure. In our case, I'm not sure how this
would play out because I'm not sure that our provider fits the original
design intent for a provider to attach under a StaticSiteMapProvider.

For example, it is likely that the child provider will be out of date on
each request because it will be a different user accessing the website. This
would cause a rebuild of the SiteMapNodes from the non-static provider and
their attachment to the Static siteMap structure. (If they do get attached -
we really can't tell because that section of the source may be missing.)
Would all of this refreshing of data in the static collections cause
threading contention? Is it possible that both threads will be adding nodes
at the same time?

Another concern is that the algorithm that the
EnsureChildProviderIsUpToDate() method uses to determine whether the
siteMapNodes in a child provider need refreshed may not be sufficient in our
case. User (1) and User(2) may have the same root node, but different
children. If the algorithm is only comparing the parents, it may not notice
this difference. Again, we do not know what the XmlSiteMapProvider is doing
to handle the case when a non-static Site Map Provider is a child of it, as
this may not be in the source we possess.

If someone on the development team for SiteMapProviders could comment, we
would appreciate it. Likewise, divulging the full source code for
XmlSiteMapProvider may also answer our question.

Alexander P. Brown
The P. stands for Provider
Oct 26 '06 #1
0 2090

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: jonathan.eves | last post by:
Hi I am having a hard time with localization of the sitemap. I have created a custom SiteMapProvider which inherits from StaticSiteMapProvider. For which everything works fine. The next...
0
by: Thomas Bandt | last post by:
Hi, I wrote my own SiteMapProvider which fetches the data from a Sql Database (Navigation hierarchy). But this data (categories) could contain absolute external Urls (like http://google.com/)...
2
by: dhurwitz | last post by:
Hi, I have written a custom SiteMapProvider to retrieve site map data from a SQL Server database table. It works fine when used as the data source for a Menu control, so I am confident that all...
0
by: ashish | last post by:
hello all, I am trying to create a custom site map provider and since my site map is very huge, I am loading the required nodes when the CurrentNode property is called.. I am wondering if...
1
by: shapper | last post by:
Hello, How to make a SiteMapDataSource to use a SiteMapProvider defined in Web.Config? I think I should use something like: MySiteMapDataSource.Provider = ... However I don't know what to...
3
by: Jeff | last post by:
Hey asp.net 2.0 In the source I posted below, there is a GridView (look at the bottom of the script): <asp:GridView ID="gvwOnline" runat="server"> </asp:GridView> I'm trying to assign a...
0
by: shapper | last post by:
Hello, I need to create a custom SiteMapProvider. I searched in Google for examples but I am still completly lost. The custom SiteMapProvider I need to create is exactly the same as the...
3
by: Anders | last post by:
Hello, i have created a custom sitemap datasource. The sitemap gets all pages from a collection from a CMS system (not directly from a database). I have declared my sitemap provider as default in...
2
by: Steve Harclerode | last post by:
Hi, I have implemented a working SiteMapProvider as shown on an msdn page: http://msdn.microsoft.com/en-us/library/ms178434(VS.80).aspx My question is: Can I make the TreeView that uses a...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
2
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.