Anyone here have tried accessing page url inside the background task ?
I tried this code but no luck . Anyone can help me what approach should I need to do here ? Thanks in advance
public IPublishedContent GetPage(int id)
{
using (var cref = _umbracoContextFactory.EnsureUmbracoContext())
{
var cache = cref.UmbracoContext.Content;
return cache.GetById(id);
}
}