mathieu
mathieu

Reputation: 31192

PDFCreator and ASP.NET

Has anyone managed to get PDFCreator running on an ASP.NET 2.0 website ?

On my development machine with Visual Studio webserver, it works just fine after following this procedure :

However, when I deploy it to our test server, it fails miserably with this error :

Retrieving the COM class factory for component with CLSID {082391C9-8188-4364-B4FD-66A1524B2097} failed due to the following error: 80070005.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.UnauthorizedAccessException: Retrieving the COM class factory for component with CLSID {082391C9-8188-4364-B4FD-66A1524B2097} failed due to the following error: 80070005. 

And I can't find this component in DCOMCNFG.msc.

Our server configuration :

Upvotes: 2

Views: 3737

Answers (2)

mapache
mapache

Reputation: 1361

The problem is that IIS process (and so ASP.Net processes) run as the SYSTEM account, wich does not have any printers set up.

You have two options:

1 - Set up the printers for the system account using the article provided by Craig Lebakken

2 - Impersonate the ASP.Net site to use an account wich has the printers set up

Upvotes: 3

Craig Lebakken
Craig Lebakken

Reputation: 1943

The following Microsoft Knowledgebase article describes the problem and a solution:

COM objects fail to print when called from ASP

Upvotes: 2

Related Questions