This is a migrated thread and some comments may be shown as answers.

RichTextBox - HtmlFormatProvider and Wikipedia throws Exception

1 Answer 72 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
David MacKenzie
Top achievements
Rank 1
David MacKenzie asked on 24 Sep 2010, 09:14 PM
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?

1 Answer, 1 is accepted

Sort by
0
Iva Toteva
Telerik team
answered on 28 Sep 2010, 08:43 AM
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
Tags
RichTextBox
Asked by
David MacKenzie
Top achievements
Rank 1
Answers by
Iva Toteva
Telerik team
Share this question
or