After upgrading to R2-SP1, the following code doesnot return the friendly url. This issue is observed only in some enviroments [machine] and some other machine the call does return the expected friendly url.Are we missing any configuration in those enviroment.
EPiServer.Global.UrlRewriteProvider.ConvertToExternal(finalUrlBuilder, pageLink, System.Text.UTF8Encoding.UTF8);
This maybe a stupid question, but is friendly url turned on on those sites? If it's not ConvertToExternal will obviously not return a furl:ed url. If you want to make sure you can check what defaultProvider for urlRewrite is set to in web.config:
Per GunsarfsEPiServer CMS development team
Yes we have turned on the friendly url on the sites. Following is the snippet from the web.config.
<urlRewrite defaultProvider="EPiServerFriendlyUrlRewriteProvider"> <providers> <add description="EPiServer standard Friendly URL rewriter" name="EPiServerFriendlyUrlRewriteProvider" type="EPiServer.Web.FriendlyUrlRewriteProvider,EPiServer" />
<add description="EPiServer identity URL rewriter" name="EPiServerIdentityUrlRewriteProvider" type="EPiServer.Web.IdentityUrlRewriteProvider,EPiServer" /> <add description="EPiServer bypass URL rewriter" name="EPiServerNullUrlRewriteProvider" type="EPiServer.Web.NullUrlRewriteProvider,EPiServer" /> </providers></urlRewrite>
Hi,In R2 we have change UrlRewriteProvider from a field to a property. Make sure that you have recompiled your modules with latest CMS R2-sp1 binary.Could that be the issue?
Regards,ShahidEPiServer Support Team.