加密 connectionStrings 部分 - app.config 的实用程序 [英] Encrypting connectionStrings section - utility for app.config
问题描述
是否有一种实用程序可以加密 app.config
文件中的命名配置部分(或只是 connectionStrings
部分)code>aspnet_regiis 与 web.config
文件?
Is there a utility that will encrypt a named configuration section (or just the connectionStrings
section) in an app.config
file in a similar manner that one can use aspnet_regiis
with web.config
files?
我知道这可以在代码中完成 - 有代码示例,但我希望避免为此编写应用程序.
I know this can be done in code - there are code examples out there, but I am hoping to avoid writing an application for this.
推荐答案
您可以尝试以下操作:
https://magenic.com/thinking/encrypting-configuration-sections-in-net
简而言之 - 将 app.config
文件重命名为 web.config
- 架构是相同的,所以 aspnet_regiis
可以工作.完成后重命名回 app.config
.
In short - rename the app.config
file to web.config
- the schema is identical, so aspnet_regiis
works. Rename back to app.config
when finished.
这篇关于加密 connectionStrings 部分 - app.config 的实用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!