Quantcast
Channel: Optimizely Search & Navigation
Viewing all articles
Browse latest Browse all 6894

Bug in using WebAPI and Tracking

$
0
0

I'm using episerver find and unified search, when I use tracking on Web API to search I get the following error:

Object reference not set to an instance of an object.

at EPiServer.Find.TrackContext..ctor()
at EPiServer.Find.SearchExtensions.GetProjectedResult[TResult](ISearch`1 search, SearchContext context)
at EPiServer.Find.SearchExtensions.GetResult(ITypeSearch`1 search, HitSpecification hitSpecification, Boolean filterForPublicSearch)
at Bendigo.Core.Services.SiteSearchService.Search(SearchResultsPage searchResultsPage, String keywords, Nullable`1 categoryId, Int32 page, Int32 pageSize, Boolean track).

as a note: I've seen the "https://world.episerver.com/forum/developer-forum/EPiServer-Search/Thread-Container/2018/3/unified-search---statistics-tracking-results-in-error/" and this is not my case.

This is related to use WebAPI and Tracking.

Hint: Look at HttpContext.Current.Session in TrackContext and remember HttpContext.Current.Session is null with WebAPI


Viewing all articles
Browse latest Browse all 6894

Trending Articles