More in this section

Forums / Developing with Sitefinity / Bug using custom role/user provider SF v5

Bug using custom role/user provider SF v5

4 posts, 0 answered
  1. Chris
    Chris avatar
    7 posts
    Registered:
    09 Jul 2012
    18 Oct 2012
    Link to this post
    Does anyone have custom membership/role providers working correctly on SF5?

    I've created one to use users from our external system but I'm finding that if I log in and out as different users Sitefinity always shows me the original username (on the login name).

    I've raised a support ticket which confirmed the problem with my sample app and suggested a short term fix of disabling all page caching which I've confirmed does solve the issue. I just wanted to see if others have custom providers working without needing to disable page caching as it'll be a big problem for us when we go live.  I've noted another thread where someone has seen the same issue using the default provider - so far I've been fine on the default, it's only my custom provider that has problems.
  2. Chris
    Chris avatar
    7 posts
    Registered:
    09 Jul 2012
    18 Oct 2012
    Link to this post
    FYI - Support have updated my ticket now and advised that this is an issue with the login status control.  The original recorded issue for it in the issue tracker has been re-opened and hopefully it'll get bumped up in time for 5.3.
  3. Joel
    Joel avatar
    40 posts
    Registered:
    30 Nov 2010
    13 Nov 2012 in reply to Chris
    Link to this post
    Chris, 

    I'm running into an issue with custom role providers in Sitefinity 5. My Membership provider seems to be validating my users properly without any sort of caching issues, but I can't enumerate my roles on the "Manage Permissions" page. 

    Let me make sure that I have a similar setup as you, are you enabling caching in ~/Sitefinity/Administration/Settings or are you using a web config setting? (Again, I just want to make sure I understand where you are setting page caching.)

    Are you caching results to GetUsers() somewhere in your provider so that it only makes a limited number of calls to your other database?

    Joel
  4. Chris
    Chris avatar
    7 posts
    Registered:
    09 Jul 2012
    13 Nov 2012
    Link to this post
    At this point I'm not caching my database calls.  That is of course the longer term plan but at this point I just wanted to get the provider working correctly before I add extra layers of complexity to the code base.

    To do the roles I created a simple Role Provider and enabled it in web.config rather than Settings.

    <roleManager enabled="true" defaultProvider="Ifx">
      <providers>
        <clear/>
        <add name="Ifx" type="SitefinityWebApp.Security.IfxRoleProvider, SitefinityWebApp"/>
      </providers>
    </roleManager>

    I found that I could never get it to work when configuring it via the Settings file.

    Chris.
4 posts, 0 answered