zls*_*h86 4 asp.net encryption identity web-config
我已经使用以下命令对Web.config文件的Identity部分进行了加密。
C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -pef ContainerName C:\project -prov RsaProvider
Run Code Online (Sandbox Code Playgroud)
现在,当我导出密钥并将其导入服务器后,在服务器上运行我的网站时,出现以下错误。
Configuration section encryption is not supported
Run Code Online (Sandbox Code Playgroud)
任何想法如何解决这个问题?
小智 5
为了能够解密sytem.web / identity部分,您必须将此条目作为该部分的最后一行。
<validation validateIntegratedModeConfiguration="false"/>
Run Code Online (Sandbox Code Playgroud)
例:
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
</modules>
<handlers>
<remove name="UrlRoutingHandler" />
</handlers>
<validation validateIntegratedModeConfiguration="false"/>
</system.webServer>
Run Code Online (Sandbox Code Playgroud)