次のシステム構成があります。
Service Pack 1 を適用した Windows 2008 Server 64 ビット
Gpg4win、バージョン 2.1.0
バージョン 2.1.0 に含まれる Gpg4win コンポーネントは次のとおりです。
GnuPG: 2.0.17
Kleopatra: 2.1.0 (2011-02-04)
GPA: 0.9.1-svn1024
GpgOL: 1.1.2
GpgEX: 0.9.7
Claws-Mail: 3.7.8cvs47
Kompendium DE: 3.0.0
Kompendium EN: 3.0.0-beta1
私がやろうとしているのは、.NET 3.5 Web サービスから Process.Start を使用して GnuPG を使用してローカル ファイルを復号化することです。
以下のこのコマンドは、そのマシンの cmd.exe から実行すると問題なく動作します。
"c:\Program Files (x86)\GNU\GnuPG\pub\" --charset utf8 --no-tty --output c:\decrypted_file.txt" --batch -r "name_for_secret_key"
--passphrase-file "C:\path_to_passphrase_file.txt"
--decrypt "c:\encrypted_file.gpg"
ただし、IIS 7.5 にデプロイされた Web サービスから実行すると機能しません。以下を試しました:
- impersonated user with admin rights (in the application pool or in the code itself) to run the process under
- ran the cmd.exe process directly with Process.Start and passed in the arguments as described above (by redirecting standard input)
結果
- exit code for gpg2.exe is 255 and nothing else happened
- in event viewer / application found errors like: Faulting application gpg2.exe, version 0.0.0.0, time stamp 0x4d6e6194, faulting module unknown, version 0.0.0.0, time stamp 0x00000000, exception code 0xc0000005, fault offset 0x00000000, process id 0x1a914, application start time 0x01cd3f46059b0031.
- by redirecting standarderror I only got the same 255 exit code
- ran Process Monitor on that machine but that hasn't helped either, there were some "Name Not Found" issues, no access denied problems and both gpg.exe and gpg2.exe results were SUCCESS and exit codes were 255.
- DEP has default settings, it's on on essential windows programs and services
これを機能させる可能性のある、私がすでに試したこととは異なる何かを考えてもらえますか?