UrlRewriteProvider.ConvertToExternal

Vote:
 

This code:
UrlBuilder ub = new UrlBuilder(url);
EPiServer.Global.UrlRewriteProvider.ConvertToExternal(ub, null, System.Text.UTF8Encoding.UTF8);
return ub.ToString();

Cause:

Exception Details: System.MissingFieldException: Field not found: 'EPiServer.Global.UrlRewriteProvider'.

Even when in a try-catch it crashes. Any solution?

#24783
Oct 07, 2008 18:15
Vote:
 
I think you are running a module that isn't recompiled against CMS R2. EPiServer CMS R2 has change UrlRewriteProvider from a field to property. You need recompile your module with EPiServer CMS R2 binary. No code need changed. We will add this in breaking changes asap.
#24784
Edited, Oct 07, 2008 20:28
Vote:
 
Thanks for the answer Ruwen, problem solved.
#24830
Oct 08, 2008 9:16
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.