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.
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?