Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > SQLsiteMapProvider Cache Problem

Reply
Thread Tools

SQLsiteMapProvider Cache Problem

 
 
Rahul
Guest
Posts: n/a
 
      04-19-2006
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

 
Reply With Quote
 
 
 
 
=?Utf-8?B?UGhhdFQ=?=
Guest
Posts: n/a
 
      04-19-2006
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/lib...xh(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.

> Thanks in Advance
>
> Rahul
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
TreeView / SQLSiteMapProvider Question Dave ASP .Net 0 06-02-2010 11:40 AM
how to enable security trimmimg with SqlSiteMapProvider rote ASP .Net 0 10-16-2008 07:12 AM
Issue with Jeff's SqlSiteMapProvider Mark B ASP .Net 0 09-05-2008 08:22 AM
SqlSiteMapProvider question for menu control =?Utf-8?B?V2ViQnVpbGRlcjQ1MQ==?= ASP .Net 2 08-17-2007 07:10 PM
SqlSiteMapProvider SteveL ASP .Net 2 03-06-2006 07:47 AM



Advertisments