我正在开发一个asp.net mvc Web应用程序。我在web.config中定义了一个名为"customAppSettingsGroup"
的自定义部分组: -
<configuration>
<configSections>
<sectionGroup name="customAppSettingsGroup">
<section name="customAppSettings" type="System.Configuration.AppSettingsSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</sectionGroup>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<customAppSettingsGroup>
<customAppSettings>
<add key="KeyOne" value="*****"/>
</customAppSettings>
</customAppSettingsGroup>
......
......
</configuration>
现在我想加密该部分主要是为了加密KeyOne值。所以我写了以下命令: -
C:\Windows\Microsoft.NET\Framework64\v4.0.30319>aspnet_regiis -pe "customAppSett
ingsGroup" -app "/Scanning" -prov "DataProtectionConfigurationProvider"
但我收到以下错误: -
Microsoft (R) ASP.NET RegIIS version 4.0.30319.18408
Administration utility to install and uninstall ASP.NET on the local machine.
Copyright (C) Microsoft Corporation. All rights reserved.
Encrypting configuration section...
The configuration section 'customAppSettingsGroup' was not found.
Failed!
所以我不确定为什么commnad找不到相关的部分?
由于