More in this section

Forums / Developing with Sitefinity / Events API - TypeInitializationException

Events API - TypeInitializationException

2 posts, 0 answered
  1. Pete
    Pete avatar
    8 posts
    06 Mar 2009
    06 Mar 2009
    Link to this post
    I am trying to take advantage of the Events API.

    This line of code generates an error:

    EventsManager eventsManager = new EventsManager("Events");



    The exception is:
    "TypeInitializationException was unhandled by user code"

    The exception detail is as follows:

    System.TypeInitializationException was unhandled by user code
      Message="The type initializer for 'Telerik.Events.EventsManager' threw an exception."
           at Telerik.Events.EventsManager..ctor(String providerName)
           at Admin_Secure_products_add.btnSubmit_Click(Object sender, EventArgs e) in c:\Development\HOAC\Ecommerce\Admin\Secure\catalog\product\add.aspx.cs:line 838
           at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
           at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
           at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
           at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
           at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
           at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
      InnerException: System.NullReferenceException
           Message="Object reference not set to an instance of an object."
                at Telerik.Events.EventsManager..cctor()

    I do have the following at the top of my code:

    using Telerik.Events;

    using Telerik.Cms.Engine;

    Any help would be appreciated!

  2. Pepi
    Pepi avatar
    981 posts
    31 Jan 2017
    07 Mar 2009
    Link to this post
    Hello Pete,

    We are closing this ticket as we have already replied to your inquiry in the other thread you have opened on the same topic. We would highly appreciate it if we continue our discussion in the other one.

    Best wishes,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
2 posts, 0 answered