不支持配置部分加密

时间:2014-02-11 22:00:34

标签: asp.net encryption web-config identity

我已使用以下命令加密了我的Web.config文件的Identity部分。

C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -pef ContainerName C:\project -prov RsaProvider

现在,当我在导出我的密钥并在服务器上导入它后在服务器上运行我的网站时,它会给我以下错误。

Configuration section encryption is not supported

任何想法如何解决这个问题?

1 个答案:

答案 0 :(得分:4)

为了能够加密system.web / identity部分,您必须将此条目作为您部分的最后一行。

<validation validateIntegratedModeConfiguration="false"/>

示例:

<system.webServer>
        <modules runAllManagedModulesForAllRequests="true">
        </modules>
        <handlers>
            <remove name="UrlRoutingHandler" />
        </handlers>
    <validation validateIntegratedModeConfiguration="false"/>
</system.webServer>
相关问题