Try our conversational search powered by Generative AI!



im getting this obsolete warning:

'EPiServer.Web.Routing.RouteCollectionExtensions.ResolveBasePath(System.Web.Routing.RequestContext, System.Web.Routing.RouteValueDictionary)' is obsolete: 'Use BasePathResolver class instead'

where can I get the BasePathResolver instance or where can i get parameters to initialize constructor of this class?

Mar 02, 2016 18:07

What are you trying to do?

Here is the link to the sdk

Mar 02, 2016 20:24
IUrlSegmentRouter segmentRouter;
            ServiceLocator.Current.TryGetExistingInstance(out segmentRouter);

            if (segmentRouter == null)

            segmentRouter.RootResolver = sd => sd.StartPage;
            var parameters = new MapContentRouteParameters
                UrlSegmentRouter = segmentRouter,
                BasePathResolver = RouteCollectionExtensions.ResolveBasePath,
                Direction = SupportedDirection.Both

and here im getting this error

May 25, 2016 13:00

It referrs to EPiServer.Web.Routing.BasePathResolver

Depending on the context of your code you can get either as a constructor dependency (if your class instance is created from IOC container), else you can get it from ServiceLocator.Current.GetInstance<BasePathResolver>()

May 25, 2016 13:27
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.