PermanentLinkMapStore.TryToMapped and PermanentLinkUtility.GetContentReference not working after EPiServer 9 Upgrade

Upgrading EPiServer 8 to 9 might result in this warning:

Warning CS0618 ‘PermanentLinkMapStore.TryToMapped(string, out string)’ is obsolete: ‘This method only supports classic/mapped url’s which are no longer used since 8.0 – use PermanentLinkUtility.GetGuid(url) to get the unique ID from an URL’

How to solve warning:

You can try:

EPiServer.Web.Routing.UrlResolver.Current.GetPermanent();

or

EPiServer.Web.Routing.UrlResolver.Current.TryToPermanent();

to get a permanent link

 

See more info here: PermanentLinkMapStore.TryToMapped and PermanentLinkUtility.GetContentReference not working after EPiServer 9 Upgrade

Leave a Reply

Your email address will not be published. Required fields are marked *