The configuration in p236 is incorrect, as shown in the following example: Code Is not executed. From this point of view, the quality of Tsinghua Publishing is really a problem. In this book, there seems to be one or more places like this, and the content is similar. Use the following code:
< Configprotecteddata >
< Providers >
< Add name = " Connectionstring " Type = " System. configuration. rsaprotectedconfigurationprovider, system. configuration, version = 2.0.0.0, culture = neutral, publickeytoken = b03f5f7f11d50a3a, processorarchitecture = msil "
Keycontainername = " Mykeycontainername "
Usemachinecontainer = " True " />
</ Providers >
</ Configprotecteddata >
reference: ASP. NET 2.0: encrypting connection strings
http://blogs.vertigosoftware.com/snyholm/archive/2005/12/16/1746.aspx
http://msdn2.microsoft.com/en-us/library/yxw286t2.aspx
Chinese
http://msdn2.microsoft.com/zh-cn/library/yxw286t2.aspx