error on using PDF Converter with asp.net

The Amyuni PDF Converter is our Printer Driver that enables you to convert any documents to PDF format. If you have any questions about installing and using the Amyuni PDF Converter please post them here.
Post Reply
weilich
Posts: 2
Joined: Fri Sep 26 2003

error on using PDF Converter with asp.net

Post by weilich »

I got a error when I use the PDF converter in asp.net code, the error is generated from the code: PDFWeb.DriverInit(PDFPrinter)
And the message is like following:
System.InvalidCastException: QueryInterface for interface CDIntf.ICDIntf failed.

The PDF converter works ok in my .NET window application. Anyone has a clue about that? Thanks a lot.

WEI
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

If you are using our latest version 2.10 of the PDF Converter than you need to use CDintfEx and not CDintf.
weilich
Posts: 2
Joined: Fri Sep 26 2003

Post by weilich »

That is not the problem. I am trying to run your sample code TN08 on our windows 2000 server. I used your old version of PDF Converter and I also tried your lastest demo version. Both have the same problem. The codes can be successfully compiled. But just get that error at running.
And I also tried to set the directive <%@Page AspCompat="true"%> in the login.aspx and use the impersonate in web.config like: <identity impersonate="true" userName="administrator" password="abcd" />, still not work.

Thanks a lot.
pcasilao
Posts: 7
Joined: Wed Mar 02 2005

QueryInterface for interface CDIntfEx.ICDIntfEx failed error

Post by pcasilao »

I also have the same problem. I installed the PDF converter demo version (TN08 - ASP.NET).

After selecting the file, I get this error when clicking on the print file button.

"QueryInterface for interface CDIntfEx.ICDIntfEx failed"
Jose
Amyuni Team
Posts: 553
Joined: Tue Oct 01 2002
Contact:

Post by Jose »

Hello WEI and pcasilao,

I suspect that the situation you are encounter is related to security. The ASP.NET user account is very limit by default and I suggest that you try to use another account.

Hope this helps?
pcasilao
Posts: 7
Joined: Wed Mar 02 2005

ASPNET user account

Post by pcasilao »

Hi Jose,

You mentioned the ASPNET user account having limited access. Wouldn't changing the account's permissions work?

You also said to use a different account. How can I do that?
Jose
Amyuni Team
Posts: 553
Joined: Tue Oct 01 2002
Contact:

Post by Jose »

Hello pcasilao,

Yes, I suspect the account's permissions should work.

I have also researched the "System.InvalidCastException: QueryInterface for interface" message and that is almost always related to permissions.

Have you tried puttign your ASP.NET user in the Admin group?

Thanks
pcasilao
Posts: 7
Joined: Wed Mar 02 2005

ASPNET Permissions

Post by pcasilao »

Ok, it works. But will this always be the case, assigning adminstrator permission to the ASPNET account to make the converter work? Any alternatives?

Also, when selecting a file from the PDFViewer, there is nothing displayed on the viewer control. I already enabled the "download ActiveX controls".
Post Reply