如何使用aspnet_regiis.exe正确加密我的Web.config? [英] How to properly encrypt my Web.config using aspnet_regiis.exe?
问题描述
根据此页面,我做了以下工作: / p>
Based off of this page, I did the following:
- 进入所有程序 - >Microsoft Visual Studio 2012 - >Visual Studio工具 - >打开VS2012 x64本地工具命令提示符。
- 键入: aspnet_regiis -peconnectionStrings-appC:/FirstName-Projects/ProjName-TEST/SolutionName/Web.config-provDataProtectionConfigurationProvider
- 已收到:-app参数中使用的值必须以正斜杠开头。
我想我在尝试通过我的C:目录调用Web.config文件时出错了。
I'm guessing I did something wrong in my attempt to call the Web.config file down through my C: directory?
然后我阅读到步骤3.4的一部分,并且还使用 aspnet_regiis -pefconnectionStringsC:FirstName-Projects / ProjName-TEST提供了DataProtectionConfigurationProvider,从而完成了所有的注册优化我可以提供的。
I then read through to the part of Step 3.4 and also tried the -pef by using aspnet_regiis -pef "connectionStrings" C:FirstName-Projects/ProjName-TEST prov "DataProtectionConfigurationProvider" which resulted in a full listing of all registration options I can provide.
任何人都可以根据Web.config文件中的C:/ FirstName-Projects / ProjName-TEST /解决方案名称/ Web.config中?
Can anyone provide me some input on what to use based on the Web.config file being in C:/FirstName-Projects/ProjName-TEST/SolutionName/Web.config?
推荐答案
请使用以下语法加密物理文件。
Please use the below syntax for encrypting the physical file.
aspnet_regiis -pef "connectionStrings" "C:/FirstName-Projects/ProjName-TEST/SolutionName"
确保以管理员身份运行命令编辑器
Ensure you run the command editor as administrator
注意:该应用程序是指您提到的命令中的IIS虚拟路径
Note: The app means the IIS virtual path in command you mentioned
这篇关于如何使用aspnet_regiis.exe正确加密我的Web.config?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!