70-516 · Question #99
You use Microsoft .NET Framework 4.0 to develop an ASP.NET 4 Web application. You need to encrypt the connection string information that is stored in the web.config file. The application is deployed…
The correct answer is A. Configuration config =. You encrypt and decrypt the contents of a Web.config file by using System.Configuration . DPAPIProtectedConfigurationProvider from the System.Configuration.dll assembly, which uses the Windows Data Protection API (DPAPI) to encrypt and decrypt data, or by using…
Question
You use Microsoft .NET Framework 4.0 to develop an ASP.NET 4 Web application. You need to encrypt the connection string information that is stored in the web.config file. The application is deployed to multiple servers. The encryption keys that are used to encrypt the connection string information must be exportable and importable on all the servers. You need to encrypt the connection string section of the web.config file so that the file can be used on all of the servers. Which code segment should you use?
Options
- AConfiguration config =
- BConfiguration config =
- CConfiguration config =
- DConfiguration config =
How the community answered
(39 responses)- A85% (33)
- B3% (1)
- C5% (2)
- D8% (3)
Explanation
You encrypt and decrypt the contents of a Web.config file by using System.Configuration . DPAPIProtectedConfigurationProvider from the System.Configuration.dll assembly, which uses the Windows Data Protection API (DPAPI) to encrypt and decrypt data, or by using System.Configuration. RSAProtectedConfigurationProvider, which uses the RSA encryption algorithm to encrypt and When you use the same encrypted configuration file on many computers in a web farm, only Configuration.RSAProtectedConfigurationProvider enables you to export the encryption keys that encrypt the data and import them on another server. This is the default setting. CHAPTER 8 Developing Reliable Applications Lesson 3: Protecting Your Data Storing Encrypted Connection Strings in Web Applications (page 555)
Topics
Community Discussion
No community discussion yet for this question.