受保护的配置:useMachineContainer的默认值?

时间:2010-02-15 16:17:02

标签: asp.net xml default-value

在ASP.NET中,当我使用受保护的配置时,我将在web.config中指定与the following类似的内容:

<configuration>
  <configProtectedData defaultProvider="SampleProvider">
    <providers>
      <add name="SampleProvider" 
        type="System.Configuration.RsaProtectedConfigurationProvider, 
              System.Configuration, Version=2.0.0.0, Culture=neutral, 
              PublicKeyToken=b03f5f7f11d50a3a,
             processorArchitecture=MSIL"
        keyContainerName="SampleKeys" 
        useMachineContainer="true" />
    </providers>
  </configProtectedData>
</configuration>

如果我不包含它,“useMachineContainer”属性的默认值是什么?

1 个答案:

答案 0 :(得分:0)

参考Reference Source implementationRsaProtectedConfigurationProvider以及DpapiProtectedConfigurationProvider,UseMachineContainer初始化为默认值'true'(如果配置中没有设置值)