Copied to clipboard

Flag this post as spam?

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


  • Barry Fogarty 493 posts 1129 karma points
    Jul 01, 2011 @ 17:33
    Barry Fogarty
    0

    'Vega.USiteBuilder.MemberTypeBase' does not contain a constructor that takes 0 arguments

    I have followed the tutorial, but I get this error when trying to create a class that inherits from MemberTypeBase.  Here is my class:

    namespace Sample.Web.MemberTypes
    {
        [MemberType]
        public class SiteMember : MemberTypeBase
        {
            [MemberTypeProperty(UmbracoPropertyType.Textstring, Tab="Personal Details")]
            public string FirstName { get; set; }

            [MemberTypeProperty(UmbracoPropertyType.Textstring, Tab = "Personal Details")]
            public string LastName { get; set; }

            [MemberTypeProperty(UmbracoPropertyType.Textstring, Tab = "Personal Details")]
            public string Address1 { get; set; }

            [MemberTypeProperty(UmbracoPropertyType.Textstring, Tab = "Personal Details")]
            public string Address2 { get; set; }

            [MemberTypeProperty(UmbracoPropertyType.Textstring, Tab = "Personal Details")]
            public string Postcode { get; set; }

            [MemberTypeProperty(UmbracoPropertyType.Textstring, Tab = "Personal Details")]
            public string City { get; set; }

            [MemberTypeProperty(UmbracoPropertyType.Textstring, Tab = "Personal Details")]
            public string Country { get; set; }

            [MemberTypeProperty(UmbracoPropertyType.TrueFalse, Tab = "Personal Details")]
            public string ResidesInAmerica { get; set; }

            [MemberTypeProperty(UmbracoPropertyType.Textstring, Tab = "Personal Details")]
            public string Phone { get; set; }

            [MemberTypeProperty(UmbracoPropertyType.Textstring, Tab = "Company Details")]
            public string Occupation { get; set; }

            [MemberTypeProperty(UmbracoPropertyType.Textstring, Tab = "Company Details")]
            public string CompanyName { get; set; }

            [MemberTypeProperty(UmbracoPropertyType.Textstring, Tab = "Company Details")]
            public string CompanyType { get; set; }

            [MemberTypeProperty(UmbracoPropertyType.TextboxMultiple, Tab = "Company Details")]
            public string CompanyAddress { get; set; }

            [MemberTypeProperty(UmbracoPropertyType.Textstring, Tab = "Company Details")]
            public string CompanyWebsite { get; set; }
        }
    }

    I have compiled the latest build (1.1.1) to use as my uSiteBuilder reference.  Sure enough,m if I look in the USiteBuilder.MemberTypeBase class, it does not seem to have a constructor with 0 args as the error suggests.  The constructor looks like this:

    public MemberTypeBase(string loginName, string email, string password);

     

    Also if I use USiteBuilder for members, can I use the ASp.Net membership and profile controls?  Or is it only based on the Umbraco member types.  Just so I know..

  • Vladan Ostojic 94 posts 210 karma points
    Jul 01, 2011 @ 20:37
    Vladan Ostojic
    3

    Hi Barry,

    You should add constructor to above class, something as following:

     

            public SiteMember (string login, string email, string password)

            : base(login, email, password)

            {

            }

    It uses Umbraco member types but you can use Asp .Net membership anyway.

     

  • Alex Skrypnyk 6132 posts 23951 karma points MVP 7x admin c-trib
    Aug 18, 2014 @ 16:38
    Alex Skrypnyk
    0

    Hi,

    We have the same problem. Solution suggested by Vladan helps to solve exception. But uSiteBuilder didn't create memberTypes at all. We are using umbraco 7.1.4 and uSiteBuilder 2.0.1.0

    Thanks, Alexandr

  • Alex Skrypnyk 6132 posts 23951 karma points MVP 7x admin c-trib
    May 15, 2015 @ 14:03
    Alex Skrypnyk
    0

    Issues isn't solved, no member type created.

Please Sign in or register to post replies

Write your reply to:

Draft