SQLsiteMapProvider Cache Problem

Discussion in 'ASP .Net' started by Rahul, Apr 19, 2006.

  1. Rahul

    Rahul Guest

    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
    Rahul, Apr 19, 2006
    #1
    1. Advertising

  2. 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.

    > Thanks in Advance
    >
    > Rahul
    >
    >
    =?Utf-8?B?UGhhdFQ=?=, Apr 19, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. SteveL

    SqlSiteMapProvider

    SteveL, Mar 5, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    5,453
    SteveL
    Mar 6, 2006
  2. =?Utf-8?B?V2ViQnVpbGRlcjQ1MQ==?=

    SqlSiteMapProvider question for menu control

    =?Utf-8?B?V2ViQnVpbGRlcjQ1MQ==?=, Aug 17, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    486
    =?Utf-8?B?V2ViQnVpbGRlcjQ1MQ==?=
    Aug 17, 2007
  3. Mark B
    Replies:
    0
    Views:
    856
    Mark B
    Sep 5, 2008
  4. rote
    Replies:
    0
    Views:
    337
  5. Dave
    Replies:
    0
    Views:
    414
Loading...

Share This Page