SQLsiteMapProvider Cache Problem

R

Rahul

Hi

I have a SQLServerSiteMapProvider code from one of the guru's from
microsoft, So i am successfully getting the records in my Menu control
which is reffering to SQLServerSIteMapProvider.

My problem

(1) I am making my query as Parametized so that I can get a different
recordset to bind to menu which will result in seeing a different tree.
So I am using session Varaiables to do that I am not getting my
SQLServerSiteMap Provider refreshed with new Records.

I have this unique situation in which the Admin User could change the
roles from a dropdown and depending on the role he selected the Site
Navigation should change. I am using this Site Navigation Provider to
bind the control.

(1) So How do you call a Dynamic query in the SQLServerSiteMapProvider
class.
2) I also saw that _root variable in most of the code snippets if not
null returns immidiately. I am just wondering how can that be possible
its not a public varaiable.But still it remembers that _root which is
of type SiteMapNode. Wondering how it retains it's va;ue.

(3) Last , I know there has been a lot of issues regarding the Cache
Invalidation.
If I need to build my Requiresment as explained above how do you folk
think < i would be able to Achieve it (i.e) Dynamic building and
populating of Site MapProvider binded to the
Menu.

Thanks in Advance

Rahul
 
G

Guest

First, since I am dealing with similar issues in another thread here, I can
maybe help a little - but not a lot.

(1) I am making my query as Parametized so that I can get a different
recordset to bind to menu which will result in seeing a different tree.
So I am using session Varaiables to do that I am not getting my
SQLServerSiteMap Provider refreshed with new Records.

I am not sure how this would work since the querynotification dependency
needs some concrete info.

I think the following link might appply...
http://msdn2.microsoft.com/en-us/library/aewzkxxh(VS.80).aspx

You might need to have the admin actually login as a limited user so that
the roles in the sitemap can control it based on login. Of course you can
probably overload/overwrite the methods that implement the role to customize
it... If that is an option.
2) I also saw that _root variable in most of the code snippets if not
null returns immidiately. I am just wondering how can that be possible
its not a public varaiable.But still it remembers that _root which is
of type SiteMapNode. Wondering how it retains it's va;ue.

The SqlSiteMapProvider is basically instantiated when the website starts up.
_root is a variable defined in the scope of the provider, thus it is in
memory until the website recycles, or until the code is changed (also causing
a re-cycle).
(3) Last , I know there has been a lot of issues regarding the Cache
Invalidation.
If I need to build my Requiresment as explained above how do you folk
think < i would be able to Achieve it (i.e) Dynamic building and
populating of Site MapProvider binded to the
Menu.

I think you would either want to have more than one provider, or you would
need to load the 'Master' sitemap. Even with the master loaded roles should
be utilized to determine what 'parts' of the sitemap are available to a
particular user.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top