Copied to clipboard

Flag this post as spam?

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


  • BK 7 posts 27 karma points
    May 20, 2010 @ 04:24
    BK
    0

    Create a member problem

    I posted a question earlier about creating a member with the following code:

    MemberType demoMemberType = new MemberType(1222);
    umbraco
    .BusinessLogic.User user = new umbraco.BusinessLogic.User(0);
    Member newMember = Member.MakeNew("John Smith", demoMemberType, user);

    This code works if I delete each Member Type's properties (generic properties - all TextString).  I need to have the generic properties on each Member Type for some additional information.  The error I get is "The given key was not present in the dictionary."  Once again, if I delete the generic properties, and I step thru this code it successfully creates a member.  As soon as I add 1 generic property, I get the error.

    I'm testing my controls in a testing web application, so maybe I'm missing some authentication/permission setting for the web.config?  Once I finish testing the control, I'm planning on using it with a macro - I was just testing it before going thru the process of the macro creation.

    Does anyone have any idea how I could go thru the umbraco database tables to see if something is wrong with the data?  Any ideas on which tables might have a problem?  Any other thoughts, ideas, suggestions ? 

    Thanks.

  • BK 7 posts 27 karma points
    May 21, 2010 @ 12:12
    BK
    0

    I have found my problem.  When I was creating my user defined controls in .Net, I was trying to develop, debug, and test in my own environment without testing inside of Umbraco (thru the Macros).  Once I took my control and tested the same code inside Umbraco with a macro, it worked.  Since I am new to Umbraco, I think I need to read more about the "how-to" of debugging the Umbraco Macros (controls).  I was thinking that part of my problem might be an incorrect web.config setting, but I could not isolate it.

    Is it possible to create a member with a .Net user control outside of Umbraco before you reference it with a macro?

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies