Copied to clipboard

Flag this post as spam?

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


  • James Woodley 9 posts 29 karma points
    Mar 17, 2010 @ 12:38
    James Woodley
    0

    Authentication Providers and Blog Providers

    Hi all,

    I am a complete Umbraco newbie and have a couple of questions that I can't quite work out using Umbraco.tv or the Documentation provided.

    Firstly, I notice Umbraco uses the ASP.Net User System, so the System.Identity namespace...is this a complete port? I.E I don't use any Umbraco methods when authenticating a user in my site, I literally stick to the ASP.Net system?

    Secondly, blogs. I am told Umbraco has blog software built in..is this something that has to be installed after the core Umbraco is installed, and how do I get posts/categories yadda yadda into it from my front end software?

    Thanks guys, your help is very very much appreciated!

    James

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Mar 17, 2010 @ 12:51
    Dirk De Grave
    0

    James,

    umbraco has a built-in membership provider which derives from the default asp.net membership provider, so you can use any of the asp.net login functionalities in your front end. So, whenever you're using an asp.net login control on the frontend, it will use the umbraco membership provider for authentication of the member. Other example: if you need members to register, use the standard asp.net CreateUserWizard (All you need to verify is that you've set up a member group (and the name of the group should be in the web.config))

    More info on membership stuff here 

    Blogs can be installed from the repository, just browse the developer section, expand the Packages node, and either install blog package from package repo or install local package (if you've downloaded it first)

    Hope this helps.

    /Dirk

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Mar 17, 2010 @ 12:53
    Dirk De Grave
    0

    web.config configuration to use umbraco membership provider

    <membership defaultProvider="UmbracoMembershipProvider" userIsOnlineTimeWindow="15">
          <providers>
            <clear />
            <add name="UmbracoMembershipProvider" type="umbraco.providers.members.UmbracoMembershipProvider" enablePasswordRetrieval="false" enablePasswordReset="false" requiresQuestionAndAnswer="false" defaultMemberTypeAlias="TestType" passwordFormat="Hashed" />
            <add name="AspNetSqlMemberShipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="LocalSqlServer" />
            <add name="UsersMembershipProvider" type="umbraco.providers.UsersMembershipProvider" enablePasswordRetrieval="false" enablePasswordReset="false" requiresQuestionAndAnswer="false" passwordFormat="Hashed" />
          </providers>
        </membership>

    Make sure to change value for defaultMemberTypeAlias to the alias name of the member group created in the admin backend.

     

    Cheers,

    /Dirk

  • James Woodley 9 posts 29 karma points
    Mar 17, 2010 @ 13:22
    James Woodley
    0

    Hi Dirk,

    Thanks very much for your prompt reply! So when a user signs in, our code to deal with the sign in uses the ASP.Net methods, but they in turn invoke the Umbraco system because of the web.config settings? Am I understanding correctly?

    Sorry my ASP.Net brain is saying, why use the Umbraco side at all, if that is just using the ASP.Net provider anyway?

    James

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Mar 17, 2010 @ 13:58
    Dirk De Grave
    0

    All depends on how you've configured the membership provider. If using the umbraco membership provider as ships with default install, then when user signs in, your code will NOT be executed, but instead the umbraco ValidateUser() method will be called (as this is the provider that's configured through web.config).

    Maybe a bit of history background may be of interest to you. Prior to v3 (and asp.net 2.0), umbraco used to use a custom authentication system (and a custom db schema - which is quite different from the standard asp.net db schema with regards to membership), but as from v4 onwards (which is based on asp.net 2.0 - including masterpages and membership providers support), the umbraco authentication system has been rewritten to take advantage of using membership providers, meaning you can, but don't have to override this implementation. If you don't, well, then you'll be using the standard umbraco membership provider.

    So, to answer your question "is that just using the asp.net provider": No, as it validates the members against a completely different db schema than the standard asp.net membership.

    You're of course allowed to use for example the standard SqlMembershipProvider, but then you won't be able to manage members from the admin backend, only when using the umbraco membership provider you will. 

    It doesn't mean you can't manage members from the admin backend, but it'll require extra coding to be able to do so.

     

    Does that make more sense now?

    Cheers,

    /Dirk

     

  • James Woodley 9 posts 29 karma points
    Mar 17, 2010 @ 16:07
    James Woodley
    0

    Hi Dirk,

    Perfect, you're a gent. Thanks very much!

Please Sign in or register to post replies

Write your reply to:

Draft