Question 136

5.4.3 Question

Multiple Choice

How do you encrypt the <connectionstrings> section of the Web.config file?

  • A. aspnet_regiis -pe "ConnectionStrings" -app "/MachineDPAPI" -prov "RsaProtectedConfigurationProvider"
  • B. aspnet_regiis -pe "Web.Config"-app "/MachineDPAPI" -prov "RsaProtectedConfigurationProvider"
  • C. aspnet_regiis -pd "ConnectionStrings" -app "/MachineDPAPI" -prov "RsaProtectedConfigurationProvider"
  • D. aspnet_regiis -pd "Web.Config" -app "/MachineDPAPI" -prov "RsaProtectedConfigurationProvider"


A. Correct: This is the proper way to encrypt the <connectionstrings> setting of the Web.config file.
B. Incorrect: This command encrypts more than the <connectionstrings> section of the Web.config file.
C. Incorrect: This command decrypts the <connectionstrings> section of the Web. config file.
D. Incorrect: This command decrypts rather than encrypts information, and more information than just the <connectionstrings> section.