Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ole Mansfeld 29 posts 43 karma points
    Nov 18, 2009 @ 09:33
    Ole Mansfeld
    0

    Dual Membership providers

    Hi umbracians - i want to control the admin with default umbraco membership provider but my frontend should use an external DB to check username and password. Has any of you guys done that and how did you do it?

    The reason is i am converting an old website (quick and dirty) which has a member database filled with information which i want to display on the frontend. The users need to do a login to access this content, and i would very much like to use the Umbraco admin to define which content should and should not be seen.when user is not logged in.

    I've already got that part working with a user login created in umbraco - it would just be great if i could use the old db for frontend and umbraco user for admin part..

    Thanks!

    Ole

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Nov 18, 2009 @ 10:11
    Richard Soeteman
    0

    Hi Ole,

    You must create a custom membership provider that validates against that old database. This video describes how that works, after that you can configure the provider in your web.config file. Make sure you change the defaultProvider and the type attribute to the ones you are using  

    <membership defaultProvider="MyCustomMembershipProvider" userIsOnlineTimeWindow="15">
                <providers>
                    <clear />
                    <add name="MyCustomMembershipProvider" type="CustomMembership.CustomMembershipProvider" enablePasswordRetrieval="true" enablePasswordReset="true" requiresQuestionAndAnswer="true"/>
                    <add name="UsersMembershipProvider" type="umbraco.providers.UsersMembershipProvider" enablePasswordRetrieval="false" enablePasswordReset="false" requiresQuestionAndAnswer="false" passwordFormat="Hashed" />
                </providers>
            </membership>

    Cheers,

    Richard

  • Ole Mansfeld 29 posts 43 karma points
    Nov 18, 2009 @ 10:57
    Ole Mansfeld
    0

    Hi Richard - thanks for the quick reply, i need to persist my umbraco login for admin section of the site (the /umbraco section) if i change the default provider it also changes the way i do login to the admin.. Is it possible to place another web.config in umbraco folder and point to default umbraco provider here?

  • Ole Mansfeld 29 posts 43 karma points
    Nov 18, 2009 @ 10:59
    Ole Mansfeld
    0

    Ahh i think i understand. Will try out your solution (sorry for not reading it properly.. )

  • Ole Mansfeld 29 posts 43 karma points
    Nov 18, 2009 @ 13:08
    Ole Mansfeld
    0

    Man i think i fu.... it up! can't do login now even though i have reset my web.config.. Even tried to insert a new password "default" by running a db script i found in another thread. iisreset, pool recycle nothing works.. Anyone had that problem?

    /O

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Nov 18, 2009 @ 13:19
    Dirk De Grave
    0

    If you can't login, provide a default password for the admin account (directly in db) and make sure to set PasswordFormat to "Clear", which should enable you to login in the admin backend.

     

    Hope this helps.

    Regards,

    /Dirk

  • Ole Mansfeld 29 posts 43 karma points
    Nov 18, 2009 @ 13:31
    Ole Mansfeld
    0

    PHEEEEWWWW you saved me on that one!

Please Sign in or register to post replies

Write your reply to:

Draft