Copied to clipboard

Flag this post as spam?

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


  • Aparna 2 posts 72 karma points
    Oct 01, 2015 @ 08:38
    Aparna
    0

    System.TypeInitializationException - umbraco.cms.businesslogic.CMSNode

    Hello,

    I am trying to do a

     uQuery.GetMember(4992)
    

    or

    Member.GetAllAsList()
    

    but I am getting below error -

    base {System.SystemException} = {"The type initializer for 'umbraco.cms.businesslogic.CMSNode' threw an exception."} Type : System.TypeInitializationException

    Inner Exception : {"Length cannot be less than zero.\r\nParameter name: length"} at umbraco.cms.businesslogic.CMSNode.get_SqlHelper() at umbraco.cms.businesslogic.member.Member.GetAllAsList() at ITNSource.Common.Code.News.SalesforceHelper.CloseOpportunities()

    I am using Umbraco version 4.9 . Can't upgrade at the moment due to lot of project dependencies. Please suggest if I am missing any config entry or something else.

    ~ Aparna

  • Aparna 2 posts 72 karma points
    Oct 05, 2015 @ 07:25
    Aparna
    0

    I was able to resolve the error. Looks like some of the Umbaco assemblies were not included in the project. After adding those (controls.dll and some uComponents dlls) as reference, I was able to run my apis correctly.

    However, I need a little suggestion now. Should I use uQuery.GetMember().GetPropertyValue OR ProfileBase.Create().GetPropertyValue() to extract property values for my members.

    ~ Aparna ...

Please Sign in or register to post replies

Write your reply to:

Draft