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 6958907
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:12:05+00:00 2026-05-27T15:12:05+00:00

I need to encrypt my web.config file on my dev machine (Windows XP SP-3)

  • 0

I need to encrypt my web.config file on my dev machine (Windows XP SP-3) and export the RSA Key to my QA machine (Windows Server 2003). I used the following command to encrypt my file.

aspnet_regiis -pe "appSettings" -app "/VirtualDirectoryName" -prov "RsaProtectedConfigurationProvider"

and then i added the following section in my web.config file

<configProtectedData>

Then i created the RSA container with the name “SampleKeys“

Web.Config was encrypted nicely and i was able to use this file on my dev machine. I however had to turn on “Impersonation” and used my windows userName and password.

I need to export my RSA Key to QA server, so that i can use my the encrypted config file.
So i’m trying to export the RSA key and its failing. I don’t understand the reason, as i’m following all the steps that are mentioned in the following link;
link text

When i try to export the RSA container, i get the error saying that the “RSA container was not found.” But when i try to create the RSA container again with the same name, i get the error stating “The RSA container already exists”.
alt text

even the following command executed successfully.

aspnet_regiis -pa "NetFrameworkConfigurationKey" "NT AUTHORITY\NETWORK SERVICE"

I however could not execute the following command;

aspnet_regiis -pa "SampleKeys" "NT AUTHORITY\NETWORK SERVICE"

I got the same error saying that “RSA container was not found.”

I also gave read access to ASPNET user on “C:\Document and Settings\All Users\Application Data\Microsoft\Crypto\RSA\MachineKey” folder.
but nothing worked.

Am i missing something?

  • 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-05-27T15:12:06+00:00Added an answer on May 27, 2026 at 3:12 pm

    Found the answer! You always need to reference the “SampleKeys”-exp once you create a key for exporting.

    aspnet_regiis -pa "SampleKeys"-exp "NT AUTHORITY\NETWORK SERVICE"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to encrypt connectionstring and some appsettings keys value in web.config from code
I need to encrypt part of our web.config for our ASP.Net 4.0 project, but
in function need key to encrypt string without mcrypt libraly in php function encrypt($str,
I need two methods one to encrypt and one to decrypt an xml file
I have an app.config file that I need to distribute with my application. It
I need to communicate Encrypted data between my Erlang/OTP Web Server and JavaScript. I
i have a web.config file that looks like this: <?xml version=1.0?> <configuration> <system.web> <compilation
I need to encrypt data and store it in a file and later be
I need to encrypt content in my web application on a per-user basis. I,
I'm using C# to generate an RSA public/private key to encrypt user information. I

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.