eXpandFramework / eXpand

DevExpress XAF (eXpressApp) extension framework. 𝗹𝗶𝗻𝗸𝗲𝗱𝗶𝗻.𝗲𝘅𝗽𝗮𝗻𝗱𝗳𝗿𝗮𝗺𝗲𝘄𝗼𝗿𝗸.𝗰𝗼𝗺, 𝘆𝗼𝘂𝘁𝘂𝗯𝗲.𝗲𝘅𝗽𝗮𝗻𝗱𝗳𝗿𝗮𝗺𝗲𝘄𝗼𝗿𝗸.𝗰𝗼𝗺 and 𝘁𝘄𝗶𝘁𝘁𝗲𝗿 @𝗲𝘅𝗽𝗮𝗻𝗱𝗳𝗿𝗮𝗺𝗲𝘄𝗼𝗿𝗸 and or simply 𝗦𝘁𝗮𝗿/𝘄𝗮𝘁𝗰𝗵 this repository and get notified from 𝗚𝗶𝘁𝗛𝘂𝗯
http://expand.expandframework.com
Microsoft Public License
222 stars 115 forks source link

Session store is unavailable #783

Closed isatahiri closed 3 years ago

isatahiri commented 4 years ago

Hello,

If i create a event by the customization method and click on save (not save & close) :

public static IObservable<Unit> ConnectSynchTracking(this ApplicationModulesManager manager) {
            return manager.WhenApplication(a => CalendarService.CustomizeSynchronization.ConnectSynchTrackingMS()
            //.Merge(CalendarService.CustomizeSynchronization.ConnectSynchTrackingGoogle())
            )
                .ToUnit();
        }

        static IObservable<Unit> ConnectSynchTrackingMS(this IObservable<GenericEventArgs<(Func<IObjectSpace> objectSpaceFactory, DevExpress.Persistent.Base.General.IEvent local, Microsoft.Graph.Event cloud, MapAction mapAction, CallDirection callDirection)>> synch) {
            return synch
                .Do(e => {
                    var tuple = e.Instance;
                    if(tuple.mapAction != MapAction.Delete) {
                        if(tuple.callDirection == CallDirection.Out) {
                            PME_Event localEvent = (PME_Event)tuple.local;
                            if(localEvent.Concerning != null) {
                                string concerningCaption = CaptionHelper.GetClassCaption(localEvent.Concerning.GetType().FullName);
                                string concerningValue = localEvent.Concerning.BusinessObjectDisplayName;
                                Microsoft.Graph.ItemBody body  = new Microsoft.Graph.ItemBody();
                                tuple.cloud.Body.Content = $"{concerningCaption} : {concerningValue}";
                            }

                            tuple.cloud.Start = localEvent.StartOn.ToDateTimeTimeZone();
                            tuple.cloud.End = localEvent.EndOn.ToDateTimeTimeZone();
                            tuple.cloud.Subject = localEvent.Subject;

                            if (tuple.cloud.Attendees != null) {
                                foreach(var clouItem in tuple.cloud.Attendees) {
                                    foreach(var localItem in localEvent.ResourceTracking) {
                                        if(clouItem.EmailAddress.Address == localItem.UserEmail) {
                                            localItem.AnsweredOn = clouItem.Status.Time.Value.DateTime;
                                        }
                                    }
                                }
                            }
                        }
                        e.Handled = true;
                    }
                })
                .ToUnit();
        }
12.10.20 22:15:28.377   no context  Error ID: 629855cd-a753-41a1-a072-1727a9184f53
Date: 12.10.2020 22:15:26
================================================================================
The error occurred:

    Type:       InvalidOperationException
    Message:    SessionStore is not available.
    Data:       0 entries
    Stack trace:

   à DevExpress.ExpressApp.Web.ASPSessionValueManagerBase.SetValue(String key, Object value)
   à DevExpress.ExpressApp.Web.ASPSessionValueManager`1.set_Value(ValueType value)
   à DevExpress.ExpressApp.Model.Core.ModelNodeValuesCache.get_ModelValuesCache()
   à DevExpress.ExpressApp.Model.Core.ModelNodeValuesCache.GetValue(ModelNode modelNode, String name, Func`2 getValueMethod)
   à DevExpress.ExpressApp.Model.Core.ModelNode.GetDefaultValueCore(ModelValueInfo info, String name)
   à DevExpress.ExpressApp.Model.Core.ModelNode.GetValue[ValueType](IModelValue`1 modelValue, String name, Int32 aspectIndex)
   à DevExpress.ExpressApp.Model.Core.ModelNode.GetValue[T](String name, Boolean inThisLayer, Int32 aspectIndex)
   à DevExpress.ExpressApp.Model.Core.ModelNode.GetValue[T](String name)
   à ModelCalendarItem.get_ObjectView()
   à Xpand.XAF.Modules.Office.Cloud.Microsoft.Calendar.CalendarService.<>c__DisplayClass27_0.<Authorize>b__4(IModelCalendarItem item) dans D:\a\1\s\src\Modules\Office.Cloud.Microsoft.Calendar\CalendarService.cs:ligne 116
   à System.Linq.Enumerable.First[TSource](IEnumerable`1 source, Func`2 predicate)
   à Xpand.XAF.Modules.Office.Cloud.Microsoft.Calendar.CalendarService.<>c.<Authorize>b__27_2(ValueTuple`3 t) dans D:\a\1\s\src\Modules\Office.Cloud.Microsoft.Calendar\CalendarService.cs:ligne 114
   à System.Reactive.Linq.ObservableImpl.Select`2.Selector._.OnNext(TSource value) dans /_/Rx.NET/Source/src/System.Reactive/Linq/Observable/Select.cs:ligne 39
    InnerException is null