【问题标题】:Configuration section encryption is not supported不支持配置节加密
【发布时间】:2014-02-11 22:00:33
【问题描述】:
我已使用以下命令加密了我的 Web.config 文件的身份部分。
C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -pef ContainerName C:\project -prov RsaProvider
现在,当我在导出密钥并将其导入服务器后在服务器上运行我的网站时,会出现以下错误。
Configuration section encryption is not supported
知道如何解决这个问题吗?
【问题讨论】:
标签:
asp.net
encryption
web-config
identity
【解决方案1】:
为了能够解密 sytem.web/identity 部分,您必须将此条目作为部分的最后一行。
<validation validateIntegratedModeConfiguration="false"/>
例子:
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
</modules>
<handlers>
<remove name="UrlRoutingHandler" />
</handlers>
<validation validateIntegratedModeConfiguration="false"/>
</system.webServer>