RichTextBox - HtmlFormatProvider and Wikipedia throws Exception

2 posts, 0 answers
  1. David MacKenzie
    David MacKenzie avatar
    1 posts
    Member since:
    May 2010

    Posted 24 Sep 2010 Link to this post

    I am trying to load a WikiPedia page into the RadRichTextEditor.  The exception is
    'InvalidCastException' or 'Specificed cast is not valid'.

    Most every web page works fine.  The code is simple.

    private void onWebPageReceived(byte[] bytes)
    {
        var provider = new HtmlFormatProvider();
        RadDocument doc = provider.Import(bytes);
    }

    I have a simple webservice on the server that fetches the webpage and returns it as a byte array.

    public static byte[] GetBytes(string url)
    {
        WebClient wc = new WebClient();
        byte[] result = wc.DownloadData(url);
        return result;
    }

    Ideas?

  2. Iva Toteva
    Admin
    Iva Toteva avatar
    1319 posts

    Posted 28 Sep 2010 Link to this post

    Hello David MacKenzie,

    We have managed to reproduce your case. It turns out that there is a bug and we have scheduled to fix it.
    As we are thankful for your feedback, we are rewarding you some Telerik points.

    Do you mind telling us what your scenario is, trying to visualize a web page in the RadRichTextBox? We might be more helpful if we get the whole picture.

    Should any other issues arise, do not hesitate to contact us again.

    All the best,
    Iva
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top