Copied to clipboard

Flag this post as spam?

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

  • wmotr 6 posts 116 karma points
    14 days ago

    System.ObjectDisposedException / "Snapshot " / TagQuery

    Hi friends from the internet,

    I have created an ArticleService used from 1/ a public API Controller (using Umbraco as a Headless CMS) 2/ a Controller using route highjacking, to show Articles List on a umbraco Hosted site.

    I followed this example :

    the only thing is that the API can Query using different tags, and we have plenty of different tags (approx 40).

    So : 1/ ArticleApiController uses ArticleService enter image description here to do a GetArticlesByTag : enter image description here

    2/ which uses Article Service and TagService : enter image description here enter image description here enter image description here

    3/ everything is registered using DI :

    enter image description here

    Unfortunately, after 1 request, I got an error, if I change the Tags Requested :

    searched = _tagQuery.GetContentByTag(tag).ToList();

    enter image description here Sorry it's in french : Impossible to access a disposed object : snapshot

    Any Idea ?

  • wmotr 6 posts 116 karma points
    1 week ago

    I finally recreated a function looping through Articles with a Contains() method overs the tags. of course it's being cached. But if someone has a clue ...

Please Sign in or register to post replies

Write your reply to: