Copied to clipboard

Flag this post as spam?

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


  • BaconBeastNz 40 posts 60 karma points
    Nov 21, 2011 @ 04:59
    BaconBeastNz
    0

    ASP.NET Membership Profiles, Can't create member properties..?

    Hi there!

    I'm using ASP.NET membership system for membership, roles & profiles.

    It's all working but I can't create any properties on my member type/role in Umbraco UI. When I open the member group in Umbraco UI it says 'Not editable from Umbraco'

    I've created a profile class that inherits from ProfileBase and I want to use that to provide a link between my Umbraco member properties and the ASP.NET Profile.

    Have I done something wrong somewhere?

    Here's my custom class:

    using System;

    using System.Web.Profile;

     

    namespace TWBHelper

    {

        public class ProfileStandard : ProfileBase

        {

            [SettingsAllowAnonymous(false)]

            public string FirstName

            {

                    get

                    {

                            var o = base.GetPropertyValue("first_name");

                            if (o == DBNull.Value)

                            {

                                    return string.Empty;

                            }

                            return (string)o;

                    }

                    set

                    {

                            base.SetPropertyValue("first_name", value);

                    }

            }

        }

    }

     

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Nov 21, 2011 @ 08:26
    Richard Soeteman
    0

    Hi,

    You can only create new properties when you use the default Umbraco Membership provider. This is because its using the Umbraco API to create/edit properties. So a custom membership provider will not work to edit the properties, you should build something yourself.

    Cheers,

    Richard

     

  • BaconBeastNz 40 posts 60 karma points
    Nov 21, 2011 @ 10:06
    BaconBeastNz
    0

    Hey Richard!

    Thanks alot for your reply. Sorry for my naievty on the matter, I really don't understand which step to take now. Is there a way to take advantage of the ASP.NET Membership system (for quick controls etc, whilst using Umbraco's Member data properties?)

    I'm not too good at custom .NET code so I'd like to take an easy option here.

    I followed http://www.aaron-powell.com/umbraco-members-profiles article but it looks like it's may have led me astray...

    Thanks

    William

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Nov 21, 2011 @ 13:17
    Richard Soeteman
    0

    Hi William,

    If you install Umbraco the norma Membership system comes out of the box. Only difference is that it is a custom implementation of Umbraco instead of the asp,net membership provider. On your website you can still use all the membership controls and it you want to use profiles on the front-end of your website you can still use the  www.aaron-powell.com/umbraco-members-profiles blogpost.

    So if you want an easy implementation. Just restore the membership settings in the web.config then it uses the Umbraco membership provider and you can edit properties directly in the back-office.

    Cheers,

    Richard

  • BaconBeastNz 40 posts 60 karma points
    Nov 22, 2011 @ 02:50
    BaconBeastNz
    0

    Hi Richard

    Ok thanks! For some reason I thought needed to switch things to use the ASP.NET controls, that's great to hear! Thanks.!

Please Sign in or register to post replies

Write your reply to:

Draft