Copied to clipboard

Flag this post as spam?

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


  • Martin Harran 16 posts 72 karma points
    Mar 04, 2011 @ 16:53
    Martin Harran
    0

    "BusinessLogic missing" Error

    I'm using V4.0.4.2 on Net 2.0 with Umbraco Membership rather than Asp.net Membership becasue it's the only way I've been able to get YAF running inside Umbraco.

    I want to register members programmatically to add some extra functionality but
    I can't get this to work. Here's my code:

    ------------------------------------------------------

    using System;
    using System.Collections.Generic;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using umbraco.cms.businesslogic.member;


    namespace MyApp.usercontrols
    {
        public partial class RegisterBeta : System.Web.UI.UserControl
        {
            public void Page_Load(object sender, EventArgs e)
            {

            }

            protected void RegisterMember()
            {


                string userName = txtUserName.Text, password = txtPassword.Text, email = txtEmail.Text;


                MemberType regMemberType = MemberType.GetByAlias("Registered");

                Member newMember = Member.MakeNew(
                    userName,
                    regMemberType,
                    new umbraco.BusinessLogic.User(0));


                newMember.Email = email;
                newMember.Password = password;

                newMember.Save();

            }
        }
    }

     ----------------------------------------------------------------------
     
     When I try to build or compile this (using VS 2008) I get the following error:

    "The type or namespace name 'BusinessLogic' does not exist in the namespace 'MyApp.umbraco' (are you missing an assembly reference?)... "

    I have umbraco.dll, cms.dll and business.dll all referenced and that seems okay because there is no error in the header statement "using umbraco.cms.businesslogic.member;" also I can see each of the subordinate namespaces in Intellisense as I type it. When I type 'umbraco' inside the partial class, however, all I get is 'schemas'

    This has me at my wits end because I'm badly behind on a project and I just can't see what the problem is. I'd greatly appreciate anyone throwing any light on it.

    Thanks

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Mar 06, 2011 @ 20:33
    Jan Skovgaard
    0

    Hi Martin

    This is probably a stupid question, but I'm asking anyway...have you right clicked where the error highlight in the code is to see if VS is able to resolve this automatically?

    /Jan

  • Martin Harran 16 posts 72 karma points
    Mar 11, 2011 @ 18:07
    Martin Harran
    0

    Tried that, no good.

    I eventually abandoned this and went with YAF running as a separate application. Seems a big gap to me that there is no up to date guide to integrating YAF and Umbraco latest versions, Dawoes's instructions at http://dawoe.blogspot.com/2009/02/intergrate-yet-another-forum-193rc2.html  were great for earlier versions and has been deservedly promoted across the Net but they are well past their Sell by Date now.

Please Sign in or register to post replies

Write your reply to:

Draft