且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

GnuPG + Web服务+ ASP.NET

更新时间:2023-08-21 21:16:40

密钥环文件是基于每个用户创建的.在运行控制台应用程序时,它将在您的目录中查找PGP密钥环文件,而在Web服务中运行时,它将在该Web服务使用的用户标识的目录中查找.

The keyring files are created on per user basis. When running the console application, it will look for the PGP keyring files in your directory, whereas when running in the web service, it will look in the directory of the user identity used by the web service.

继续打开cmd,转到GPG安装目录,然后键入gpg -h.在顶部附近的某个位置,它将为您显示登录用户的密钥环文件所在的路径.

Go ahead open up cmd, change to the GPG install directory and type in gpg -h. Somewhere near the top it will show you the path where the keyring files are located for your logged on user.

您可以采取的解决措施是将密钥环文件复制到Web服务用户希望找到的位置.不确定gpg是否提供任何命令行选项来选择其他密钥环文件位置.

What you can do to fix this is to copy the keyring files to where it expected to find it for the web service user. Not sure if there's any command line option for gpg to select a different keyring file location.