Webserver thrown error

Hi
I am evaluating the Syncfusion.Pdf for one of my projects, It has some intermittent errors in the following line

using (System.Drawing.Image img = html.ConvertToImage(strUrl, ImageType.Metafile, 1024))

with an error msg something like "Internet explorer can not open the page..."

after that when i am closing the application(or webserver) the following error occured.

please suggest me what causes the error.

Unable to cast COM object of type 'System.__ComObject' to interface type 'SHDocVw.IWebBrowser2'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{D30C1661-CDAF-11D0-8A3E-00C04FC9E26E}' failed due to the following error: The component is configured to use synchronization and this method call would cause a deadlock to occur. (Exception from HRESULT: 0x8004E005).



Error.zip

5 Replies

YG Yavanaarasi G Syncfusion Team May 6, 2008 07:30 AM UTC

Hi Saravanan,

Thank you for your interest in Syncfusion products.

Please refer the below link for converting HTML to PDF and avoid such types of errors:

http://www.syncfusion.com/products/pdf/web/Articles/Html_To_PDF.aspx


If the problem still exists could you please provide the following details.

1.System Configuration

2.Adobe version

3.IE version

Regards,
G.Yavana





AD Administrator Syncfusion Team May 7, 2008 01:59 AM UTC

Hi
Thank you for the reply.
Earlier i put the assemblies in the bin. I have now moved the assemblies to the gac. Now the COM error has gone.

But When opening the webpage through the following line

using (System.Drawing.Image img = html.ConvertToImage(strUrl, ImageType.Bitmap, 1024, -1, AspectRatio.KeepWidth))

(as per the suggestion from the page you had mentioned in the last reply). Now i am getting the error in cassini

---------------------------
Microsoft Internet Explorer
---------------------------
Internet Explorer cannot download ... from localhost.

Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later.

Then i configured the same in the IIS as virtual directory as mentioned the page you had mentioned in the reply.

here i am not getting any error message but getting an empty PDF with two pages(i tried to export two webpages)

I have attached the zip which contains the following
1) Error msg i got in cassini
2) Empty PDF i got in IIS
3) Source code used

Please suggest me what should i need to do. Am i missing anything in the source code or configuration?



AD Administrator Syncfusion Team May 7, 2008 02:11 AM UTC

Hi
Thank you for the reply.
Earlier i put the assemblies in the bin. I have now moved the assemblies to the gac. Now the COM error has gone.

But When opening the webpage through the following line

using (System.Drawing.Image img = html.ConvertToImage(strUrl, ImageType.Metafile, 1024, -1, AspectRatio.KeepWidth))

(as per the suggestion from the page you had mentioned in the last reply). Now i am getting the error in cassini

---------------------------
Microsoft Internet Explorer
---------------------------
Internet Explorer cannot download ... from localhost.

Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later.

Then i configured the same in the IIS as virtual directory as mentioned the page you had mentioned in the reply.

here i am not getting any error message but getting an empty PDF with two pages(i tried to export two webpages)

I have attached the zip which contains the following
1) Error msg i got in cassini
2) Empty PDF i got in IIS
3) Source code used

Please suggest me what should i need to do. Am i missing anything in the source code or configuration?



SourceCode ANd Error.zip


AD Administrator Syncfusion Team May 7, 2008 04:42 AM UTC

Hi
Please find the info as requested

OS : Microsoft Windows Server 2003 Service Pack 2
IE : 6.0.3790.3959
.net : v2.0.50727
SyncFusion: 6.202.0.40




NR Nandakumar R Syncfusion Team May 8, 2008 01:06 PM UTC

Hi Pon Saravanan,

Issue may be with the interop assemblies running from server. It requires full control to run web applications from servers. You will need to verify if the application runs with full control.

Please refer to the below screenshots for configuring application in IIS with full control.
http://www.syncfusion.com/Product/uploads/IIsConfig_b67964da.zip

Select your application in IIS, right click for its properties, and make sure if the application has full access and run in ASPNET account as mentioned in above screenshots and restart IIS.

We are following this issue in the DirectTrac. Thank you.

Regards,
Nanda



Loader.
Up arrow icon