Charity site calendar

Posted by Community Admin on 05-Aug-2018 03:50

Charity site calendar

All Replies

Posted by Community Admin on 29-May-2012 00:00

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

Posted by Community Admin on 16-Oct-2012 00:00

Scott,
Did you come up with a solution to this?

Posted by Community Admin on 16-Oct-2012 00:00

@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();

This thread is closed