nerdexam
Microsoft

70-516 · Question #274

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create a Microsoft Windows Forms application, You plan to deploy the application to several shared client computers. You write…

The correct answer is B. Dim section As ConnectionStcingsSection =. You encrypt and decrypt the contents of a Web.config file by using System.Configuration . DPAPIProtectedConfigurationProvider, which uses the Windows Data Protection API (DPAPI) to encrypt and decrypt data, or System.Configuration. RSAProtectedConfigurationProvider, which uses…

Deploying and Troubleshooting Data Access

Question

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create a Microsoft Windows Forms application, You plan to deploy the application to several shared client computers. You write the following code segment. (Line numbers are included for reference only.) 01 Dim config As Configuration = Conf igurationManager .OpenExeConf iguratlon(exeConf igName) 03 config.Save() 04 ... You need to encrypt the connection string stored in the .config file. Which code segment should you insert at line 02?

Options

  • ADim section As ConnectionStringsSection _
  • BDim section As ConnectionStcingsSection =
  • CDim section As ConnectionStringsSection =
  • DDim section As ConnectionStringsSection =

How the community answered

(69 responses)
  • A
    14% (10)
  • B
    75% (52)
  • C
    3% (2)
  • D
    7% (5)

Explanation

You encrypt and decrypt the contents of a Web.config file by using System.Configuration . DPAPIProtectedConfigurationProvider, which uses the Windows Data Protection API (DPAPI) to encrypt and decrypt data, or System.Configuration. RSAProtectedConfigurationProvider, which uses the RSA encryption algorithm to encrypt and decrypt data. When you use the same encrypted configuration file on many computers in a Web farm, only System.Configuration.RSAProtectedConfigurationProvider enables you to export the encryption keys that encrypt the data and import them on another server. This is the default CHAPTER 2 ADO.NET Connected Classes Lesson 1: Connecting to the Data Store Storing Encrypted Connection Strings in Web Applications (page 76) Securing Connection Strings

Topics

#connection string encryption#configuration protection#SectionInformation#deployment security

Community Discussion

No community discussion yet for this question.

Full 70-516 Practice