Mailing List Archive

Access secret key from C# asp.net website using Process class
I have a public and private key on a Windows web server that I am able
to use without problems using DOS commands. I can do import, encrypt,
decrypt, list-secret-keys etc. I am trying to do the same from a web
page. From a C# asp.net web page using the Process class, I can import a
public key and encrypt a file. But I can not decrypt a file from the web
page. From the web page, when I do a --list-keys, it only lists the
public keys. From the web page, when I do a --list-secret-keys, it lists
nothing.

When I try to decrypt, the error output is:
gpg: encrypted with 2048-bit RSA key, ID AAAAAAAAAAAAAAAA, created
2019-12-06 "Company A " gpg: decryption failed: No secret key

My gpg cmd is:
gpg --batch --trust-model always --pinentry-mode loopback --passphrase
"xxxxxxxxxx" --output "D:\Websites\test.txt" --decrypt
"D:\Websites\test.pgp"

How can I access the secret-key from the web page?

thanks