我需要加密网络配置的某些部分。在阅读了一些教程后,我了解到使用 ASPNET_REGIIS 工具是可行的方法。
这就是我目前正在尝试的:
从命令提示符
ASPNET_REGIIS -pef "identity" "D:\IIS\admin.mySite.com"
“未找到配置部分 'system.web\identity'。”
ASPNET_REGIIS -pef "system.web\identity" "D:\IIS\admin.mySite.com"
“未找到配置部分 'system.web\identity'。”
ASPNET_REGIIS -pef "system.web/identity" "D:\IIS\admin.mySite.com"
“无法使用提供者'RsaProtectedConfigurationProvider' 加密部分'system.web/identity' 来自提供者的错误消息:对象已经存在。”
为了尝试看看是否做对了,我尝试了以下操作:
ASPNET_REGIIS -pef "connectionStrings" "D:\IIS\admin.mySite.com"
“无法使用提供者'RsaProtectedConfigurationProvider' 加密部分'connectionStrings' 来自提供者的错误消息:对象已经存在。”
ASPNET_REGIIS -pef "connectionStrings" "D:\IIS\admin.mySite.com"
“无法使用提供者'RsaProtectedConfigurationProvider' 加密部分'connectionStrings' 来自提供者的错误消息:对象已经存在。”
ASPNET_REGIIS -pef "DoesNotExist" "D:\IIS\admin.mySite.com"
“未找到配置部分‘DoesNotExist’。”
帮助!
最佳答案
我遇到了类似的问题,当我尝试从具有提升权限的命令提示符(“以管理员身份运行”)运行它时解决了该问题。
关于asp.net - 使用 ASPNET_REGIIS 加密 Web 配置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8344373/