Cant decrypt in IIS hosted wcf service but works fine in console

Daniel Kahn Gillmor dkg at
Wed Oct 26 15:39:59 CEST 2016

On Tue 2016-10-25 19:18:40 -0400, Bonthu, Janardhan wrote:

> .Net WCF service development issues with GPG.
> I am using GPG for Encryption and Decryption of the message, however,
> I could not decrypt the message in WCF service hosted in IIS. But I
> can decrypt using the same code in console application.
> Please check the same and do the needful.
> Error : {"gpg: encrypted with RSA key, ID 642C729C\r\ngpg: encrypted with RSA key, ID 765F4971\r\ngpg: decryption failed: No secret key\r\n"}

Is IIS running as the same user account as the console application?  If
they're different user accounts, it seems likely that they'd have access
to different secret keyrings.


More information about the Gnupg-users mailing list