Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8088353
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T19:03:58+00:00 2026-06-05T19:03:58+00:00

I need to decrypt a conection that was created initially under an account that

  • 0

I need to decrypt a conection that was created initially under an account that is no longer available.

In order to do that I made a simple app:

private void btnEncrypt_Click(object sender, EventArgs e)
    {            
        DataProtection.DataProtector dp = new DataProtection.DataProtector(DataProtection.DataProtector.Store.USE_MACHINE_STORE);
        try
        {
            byte[] dbToEncrypt = Encoding.ASCII.GetBytes(txtText.Text);
            string resultEncrypted = Convert.ToBase64String(dp.Encrypt(dbToEncrypt, null));
            txtEncrypt.Text = resultEncrypted;                
        }
        catch (Exception ex)
        {
            MessageBox.Show("Error: " + ex.Message);
        }
    }
private void btnDecrypt_Click(object sender, EventArgs e)
    {            
        DataProtection.DataProtector dp = new DataProtection.DataProtector(DataProtection.DataProtector.Store.USE_MACHINE_STORE);
        try
        {
            byte[] dbToDecrypt = Convert.FromBase64String(txtEncrypt.Text);
            string resultDecrypted = Encoding.ASCII.GetString(dp.Decrypt(dbToDecrypt, null));
            txtDecrypt.Text = resultDecrypted;
        }
        catch (Exception ex)
        {
            MessageBox.Show("Error: " + ex.Message);
        }
    }

Now, I have noticed that when I do a test in my computer, and try to decrypt the encrypted result in a different computer I get:

Exception decrypting. Decryption failed. Key not valid for use in
specific state.

Then, I did some research and found out this:

Did you export the key from one server to the other so they are both
set up the same? If not, you are using mismatched keys, which will
cause an encryption/decryption error.

and I can find the keys here:

How to get the validationkey value and decryptionkey value?

decryption key can be found at “D:\Documents and Settings\All
Users\Application Data\Microsoft\Crypto\RSA\MachineKeys”

so my question is: If I export the keys in that location from my computer the the one I want to decrypt the data will that work? and by export mean just copy the key files or do another operation?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T19:03:59+00:00Added an answer on June 5, 2026 at 7:03 pm

    AFAIK this is not possible – and in any case is not desirable. DPAPI regularly creates new keys, so even if you could copy the keys between machines, they would become obsolete after a period of time.

    If you want to decrypt data on more than one computer, use a different method, e.g. RSA.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my Python web app, I would need to decrypt a file that was
I have an encrypted bit of text that I need to decrypt. It's encrypted
I need to build a small private app. I want to store a piece
I need to decrypt some data that has been 3des encoded on system running
I have a private key that I decrypt using a password from the user,
I am writing application that encrypts photos and though it need decrypt and show
I need to decrypt a file which is encrypted using a private key. I
I need to encrypt / decrypt passwords for a new application. The spec requires
I need a PHP script to decrypt the RSA encrypted string generated by this
I need two methods one to encrypt and one to decrypt an xml file

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.