2

PDFCreator を ASP.NET 2.0 Web サイトで実行できた人はいますか?

Visual Studio Web サーバーを搭載した私の開発マシンでは、次の手順を実行すると問題なく動作します。

  • tlbimp で com interop dll を作成する
  • このdllを参照
  • それを使用するコードを書く

ただし、テストサーバーにデプロイすると、次のエラーで惨めに失敗します。

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. 

そして、このコンポーネントが DCOMCNFG.msc に見つかりません。

私たちのサーバー構成:

  • Windows 2003
  • Asp.net 2.0
  • MS オフィス XP
  • PDFクリエーター 0.9.0
4

2 に答える 2

3

問題は、IIS プロセス (および ASP.Net プロセス) が SYSTEM アカウントとして実行され、プリンターが設定されていないことです。

次の 2 つのオプションがあります。

1 - Craig Lebakken が提供する記事を使用して、システム アカウント用のプリンターをセットアップします。

2 - ASP.Net サイトを偽装して、プリンターがセットアップされているアカウントを使用する

于 2008-11-28T19:10:32.043 に答える
2

次の Microsoft Knowledgebase 記事では、問題と解決策について説明しています。

COM オブジェクトが ASP から呼び出されたときに印刷に失敗する

于 2008-11-11T15:00:59.437 に答える