Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • mmaty 113 posts 286 karma points
    Sep 05, 2024 @ 08:19
    mmaty
    0

    ObjectDisposedException from MemberManager

    Hello everyone,

    Umbraco version 10.8.6.

    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?

Please Sign in or register to post replies

Write your reply to:

Draft