+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Object reference not set to an instance of an object.

Object reference not set to an instance of an object.

4 posts, 0 answered
  1. Michael
    Michael avatar
    35 posts
    Registered:
    04 Nov 2010
    10 Nov 2010
    Link to this post
    I get the following error when I 1) go to add a newsletter subscriber, then 2) click on the 'add registered CMS users' link:

    Object reference not set to an instance of an object.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

    Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

    Source Error: 

    Line 363:                if (this.mode != Mode.Search)
    Line 364:                {
    Line 365:                    subscriber = this.dataManager.GetSubscriber(((MembershipUser)e.Item.DataItem).Email);
    Line 366:                    if (subscriber != null && this.dataManager.GetGroupSubscriberRelation(this.selectedGroupId,
    Line 367:                         subscriber.SubscriberId) != null)

    Source File: c:\Inetpub\wwwroot\WNMW\Sitefinity\Admin\ManageRecepients.aspx.cs    Line: 365 

    Stack Trace: 

    [NullReferenceException: Object reference not set to an instance of an object.]
       Nolics.ORMapper.Base.Query`1.FillQueryParameters(DataTable dtQuery) +547
       Nolics.ORMapper.Base.QueryBase`1.LoadQuery(Int32 maxElements, Int32 fromElement) +177
       Nolics.ORMapper.Base.QueryBase`1.LoadAll() +25
       Telerik.Notifications.Data.DefaultProvider.GetSubscriber(String email) +84
       Telerik.Notifications.Newsletters.DataManager.GetSubscriber(String email) +15
       Telerik.ManageRecepients.Newsletter_Default.repeater_ItemDataBound(Object sender, RepeaterItemEventArgs e) in c:\Inetpub\wwwroot\WNMW\Sitefinity\Admin\ManageRecepients.aspx.cs:365
       System.Web.UI.WebControls.Repeater.OnItemDataBound(RepeaterItemEventArgs e) +115
       System.Web.UI.WebControls.Repeater.CreateItem(Int32 itemIndex, ListItemType itemType, Boolean dataBind, Object dataItem) +138
       System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean useDataSource) +478
       System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e) +61
       System.Web.UI.WebControls.Repeater.DataBind() +76
       Telerik.ManageRecepients.Newsletter_Default.Page_Load(Object sender, EventArgs e) in c:\Inetpub\wwwroot\WNMW\Sitefinity\Admin\ManageRecepients.aspx.cs:197
       System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
       System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
       System.Web.UI.Control.OnLoad(EventArgs e) +91
       System.Web.UI.Control.LoadRecursive() +74
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207
    


    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    10 Nov 2010
    Link to this post
    Hi Michael,

    It looks like you have set Active Directory as your default provider, since it should be the default one Sitefinity. The error is thrown, because there is a subscribe which does not have an Email set.

    Greetings,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Michael
    Michael avatar
    35 posts
    Registered:
    04 Nov 2010
    10 Nov 2010
    Link to this post
    So what's the solution? The account subscribing has an associated AD email.
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    10 Nov 2010
    Link to this post
    Hello Michael,

    e.Item.DataItem is null or Email property of the subscriber. The error is for null reference exception so there are no other cases that I can see here. Could you attach the debugger to the line which throws the error and check what exactly is null?

    All the best,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
4 posts, 0 answered