We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

HtmlConverter

Thread ID:

Created:

Updated:

Platform:

Replies:

101288 Oct 12,2011 06:08 PM UTC Oct 13,2011 07:10 AM UTC ASP.NET Web Forms (Classic) 1
loading
Tags: PDF
Administrator [Syncfusion]
Asked On October 12, 2011 06:08 PM UTC

Is there a way to use the HtmlConverter and not get the following error without placing AspCompat ="true" at the top of the aspx page because this is not an option for my application.

ActiveX control '8856f961-340a-11d0-a96b-00c04fd705a2' cannot be instantiated because the current thread is not in a single-threaded apartment.


Geetha M [Syncfusion]
Replied On October 13, 2011 07:10 AM UTC

Hi,

Thank you for evaluating Syncfusion products.

Our HTMLConverter makes use of WebBrowser control which can run only in STA mode. Please make use of the following code to avoid Active X error:

Thread t = new Thread(CreateDocument);
t.SetApartmentState(ApartmentState.STA);
t.Start();
t.Join();

Please try this and let me know if you have any questions.

Regards,
Geetha


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;