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

Forums / Sitefinity SDK / Charity site calendar

Charity site calendar

3 posts, 0 answered
  1. Scott Rozman
    Scott Rozman avatar
    93 posts
    Registered:
    10 Oct 2012
    29 May 2012
    Link to this post
    I was just trying to run this site as a part of the SDK in version 5.0.2500.0 because I am interested in the calendar functionality.
    I got the site up and navigated to the events page and could see the dates of the 3 events which exist as content. Then if I go to the calendar page, I see the calendar, although it looked very narrow. If I use some of the arrows at the top to navigate to different months and go to months where an event exists, it throws an error:

    The ObjectScope has already been disposed and it's managed persistent objects can no longer be accessed. The ObjectScope should be disposed at the end of the life cycle of your business logic instance. This can also be done in the Dispose of your ASP page or MVC controller.
    Object name: 'OpenAccessRuntime.EnlistableObjectScope'.

    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.ObjectDisposedException: The ObjectScope has already been disposed and it's managed persistent objects can no longer be accessed. The ObjectScope should be disposed at the end of the life cycle of your business logic instance. This can also be done in the Dispose of your ASP page or MVC controller.
    Object name: 'OpenAccessRuntime.EnlistableObjectScope'.

    Source Error: 

    Line 189:
    Line 190:			// parse to collection
    Line 191:			Month_Events = events.ToLookup(e => e.EventStart.Day);
    Line 192:		}
    Line 193:

    Source File: c:\Users\sfrozman\AppData\Local\Telerik.Sitefinity.SDK\Charity_49BB01BD\SitefinityWebApp\Widgets\Calendar\CalendarView.cs    Line: 191 

    Stack Trace: 

    [ObjectDisposedException: The ObjectScope has already been disposed and it's managed persistent objects can no longer be accessed. The ObjectScope should be disposed at the end of the life cycle of your business logic instance. This can also be done in the Dispose of your ASP page or MVC controller.
    Object name: 'OpenAccessRuntime.EnlistableObjectScope'.]
       OpenAccessRuntime.ObjectScope.CheckNotDisposed() +74
       OpenAccessRuntime.ObjectScope.Telerik.OpenAccess.SPI.IExtendedObjectScope.get_ShouldLogExpressions() +13
       Telerik.OpenAccess.Query.ExtentQueryImpl`1.Telerik.OpenAccess.Query.ExecutionSettings.get_ShouldLogExpressions() +25
       Telerik.OpenAccess.Query.ExpressionCutter.CutAndExecute(Expression expression, ExecutionSettings settings, Expression whole) +45
       Telerik.OpenAccess.Query.Piece`1.ExecuteMultiple() +87
       Telerik.OpenAccess.Query.Piece`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator() +5
       Telerik.Sitefinity.Data.Linq.LinqQuery`2.GetEnumerator() +83
       System.Linq.Lookup`2.Create(IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer) +145
       System.Linq.Enumerable.ToLookup(IEnumerable`1 source, Func`2 keySelector) +89
       SitefinityWebApp.Widgets.Calendar.CalendarView.LoadData() in c:\Users\sfrozman\AppData\Local\Telerik.Sitefinity.SDK\Charity_49BB01BD\SitefinityWebApp\Widgets\Calendar\CalendarView.cs:191
       SitefinityWebApp.Widgets.Calendar.CalendarView.Cal_DefaultViewChanged(Object sender, DefaultViewChangedEventArgs e) in c:\Users\sfrozman\AppData\Local\Telerik.Sitefinity.SDK\Charity_49BB01BD\SitefinityWebApp\Widgets\Calendar\CalendarView.cs:232
       Telerik.Web.UI.RadCalendar.OnDefaultViewChanged(DateTime newDate, DateTime previousDate) +202
       Telerik.Web.UI.RadCalendar.RaisePostBackEvent(String eventArgument) +410
       Telerik.Web.UI.RadCalendar.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +13
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
       System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +176
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563
  2. David
    David avatar
    16 posts
    Registered:
    10 Apr 2012
    16 Oct 2012
    Link to this post
    Scott,
    Did you come up with a solution to this?
  3. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    16 Oct 2012 in reply to Scott Rozman
    Link to this post
    @David
      I don't have it installed to try, but perhaps would one of these work?
    Month_Events = events.ToList().ToLookup(e => e.EventStart.Day);
    // OR
    Month_Events = events.ToList(e => e.EventStart.Day);
    // OR
    Month_Events = events.ToLookup(e => e.EventStart.Day).ToList();

3 posts, 0 answered