Decryption by IDM Script executed by JobServer

Hi everyone,

I try to iterate all history dbs for some needed operations.

Therefore I read the DialogHistoryDB table and try to use the TransportConnectionString for the connection.

This string is encrypted, so I have to decrypt it.

The methods

- Session.Decrypt

- Session.Encryption.Decrypt

- Session.Encryption.DecryptPartial

all don´t work. Error message is

Encryption error. The data was probably encrypted with the wrong public key.
[System.Security.Cryptography.CryptographicException] Key does not exist.

I think in the past I did this once successfully (as a job server side task) but can´t get it working now. Some ideas what could cause the problem?

Thank you in advance.