Hi,
I have a bug with DataObject 6.0.0.0:
System.ServiceModel.FaultException: System.ObjectDisposedException: Cannot access a disposed object.
\n
Call stack:
Object name: 'Session is already disposed.'.
at Xtensive.Orm.Session.EnsureNotDisposed()
at Xtensive.Orm.Providers.SqlSessionHandler.Prepare()
at Xtensive.Orm.Providers.SqlSessionHandler.ExecuteQueryTasks(IEnumerable1 queryTasks, Boolean allowPartialExecution)
at Xtensive.Orm.Session.ProcessInternalDelayedQueries(Boolean allowPartialExecution)
at Xtensive.Orm.Internals.Prefetch.Fetcher.ExecuteTasks(IEnumerable
1 containers, Boolean skipPersist)
at Xtensive.Orm.Internals.Prefetch.PrefetchManager.ExecuteTasks(Boolean skipPersist)
at Xtensive.Orm.Providers.SqlSessionHandler.FetchEntityState(Key key)
at Xtensive.Orm.QueryEndpoint.SingleOrDefault(Key key)
at Serensia.Pilot.Business.Security.UserPrincipal.GetCurrentUserPrincipal()
The method that is concerned by the callstack:
public static UserPrincipal GetCurrentUserPrincipal()
{
IUserIdentity userIdentity = Agent.Current.GetKernelModule<isecuritymodule> ().GetCurrentIdentity();
if (userIdentity != null && !String.IsNullOrEmpty(userIdentity.PersistentUserKey))
{
Key doKey = Key.Parse(Domain.Current, userIdentity.PersistentUserKey);
UserPrincipal userPrincipal = Session.Current.Query.SingleOrDefault<userprincipal> (doKey);
return userPrincipal;
}
return null;
}
asked
Sep 25 '20 at 04:35
Makertoo
5●1●1●3