I'm having trouble with the Episerver Find indexing job, when i run the indexing job it doesn't index all of my content on the site. I Debuged the project while running the indexing job and it crashed on this line of code and gave me this exception.
var roleManager = ServiceLocator.Current.GetInstance();
An exception of type 'EPiServer.ServiceLocation.ActivationException' occurred in EPiServer.Framework.dll but was not handled in user code
Additional information: Activation error occurred while trying to get instance of type ApplicationRoleManager`1, key ""
Any idea what it could be?
WARN EPiServer.Find.Cms.ContentIndexer: DESKTOP-1234: An exception occurred during reindex operation. System.AggregateException: One or more errors occurred. ---> EPiServer.ServiceLocation.ActivationException: Activation error occurred while trying to get instance of type ApplicationRoleManager`1, key "" ---> StructureMap.Building.StructureMapBuildException: Failure while building 'Lambda: HttpContext.Current.GetOwinContext().Get()', check the inner exception for details1.) Lambda: HttpContext.Current.GetOwinContext().Get()2.) Instance of ApplicationRoleManager3.) Container.GetInstance(ApplicationRoleManager<>MyUser>)> ---> System.NullReferenceException: Object reference not set to an instance of an object. at System.Web.HttpContextExtensions.GetOwinEnvironment(HttpContext context) at System.Web.HttpContextExtensions.GetOwinContext(HttpContext context) at lambda_method(Closure , IBuildSession , IContext ) --- End of inner exception stack trace ---
Do you get it when you run it manually of when it is run by schedule?
When run by schedule there are no logged in user
I've tried running it both ways, but i still get the same error.