I use the MemberManager as stated in the documentation:
var mem = await memberManager.FindByIdAsync( member.Id.ToString() );
return memberManager.AsPublishedMember( mem );
But I get this exception:
System.ObjectDisposedException: Cannot access a disposed object.
at System.Threading.ReaderWriterLockSlim.TryEnterReadLockCore(TimeoutTracker timeout)
at Umbraco.Cms.Web.Common.ModelsBuilder.InMemoryModelFactory.EnsureModels()
at Umbraco.Cms.Web.Common.ModelsBuilder.InMemoryModelFactory.CreateModel(IPublishedElement element)
at Umbraco.Extensions.PublishedContentExtensionsForModels.CreateModel(IPublishedContent content, IPublishedModelFactory publishedModelFactory)
at Umbraco.Cms.Infrastructure.PublishedCache.PublishedMember.Create(IMember member, IPublishedContentType contentType, Boolean previewing, IPublishedSnapshotAccessor publishedSnapshotAccessor, IVariationContextAccessor variationContextAccessor, IPublishedModelFactory publishedModelFactory)
at Umbraco.Cms.Infrastructure.PublishedCache.MemberCache.Get(IMember member)
at Umbraco.Cms.Core.Security.MemberUserStore.GetPublishedMember(MemberIdentityUser user)
at Rintra.Classes.Rintra.MemberHelper.ToPublishedMember(IUser user, IMemberManager memberManager, ILogger logger) in G:\Projekte\...\MemberHelper.cs:line 143
Do any of you have an idea what's going on here? How can I fix it?
ObjectDisposedException from MemberManager
Hello everyone,
Umbraco version 10.8.6.
I use the MemberManager as stated in the documentation:
But I get this exception:
Do any of you have an idea what's going on here? How can I fix it?
is working on a reply...