سلام
چند وقت پیش همین مشکل رو داشتم که به این نتیجه و جواب رسیدم:
How are you encrypting the data on the Windows XP machine? Did you copy the config file from your Windows 7 machine by any chance?
The Encryption API uses a unique encryption key for your account/machine to encrypt the data. That means that a config file encrypted on one machine cannot be decrypted on another.
So you will have to encrypt the config file on the XP machine, or use a custom encryption key which you then have to install onto the machine in order for you to read the connection string.
و
"Key" is involved Encryption/Decryption always. If you just enrypt a file on your PC and share the file to anyone they can't decrypt the data without the key. So you have to share the key along with the file. Atleast you have to hard code the key in your source code or keep it resources.
مختصر:
app.config فقط روی همون کامپیوتری که اِنکریپت شده میتونه dycrypt بشه ! در واقع کلید این قفل فقط توی همون کامپیوتر خودتون وجود داره که قفل رو باز کنه و در کامپیوتر های دیگه معنی نداره !
یا هم اینکه یه کلید واسش بسازین و روی کامپیوتر های دیگه نصب کنید؛ که این کار عملآ انگار app.config رو انکریپت نکردین !