如何用正确的aspnet_regiis.exe加密我的web.config? [英] How to properly encrypt my Web.config using aspnet_regiis.exe?

查看:993
本文介绍了如何用正确的aspnet_regiis.exe加密我的web.config?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据本页面的,我做了以下内容:

Based off of this page, I did the following:


  1. 又到所有程序 - >微软的Visual Studio 2012 - >Visual Studio工具 - >打开VS2012或x64​​原生工具命令提示符

  2. 类型的:为aspnet_regiis -pe是connectionStrings-appC:/FirstName-Projects/ProjName-TEST/SolutionName/Web.config-provDataProtectionConfigurationProvider

  3. 收到:在-app参数必须以正斜杠开始使用的值

我猜我做错了什么事,我试图调用Web.config文件中向下穿过我的C:目录

I'm guessing I did something wrong in my attempt to call the Web.config file down through my C: directory?

我再看一遍,以3.4步的组成部分,也是通过尝试-pef 为aspnet_regiis -pef是connectionStringsC:姓-项目/ 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/SolutionName/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是connectionStringsC:/姓-项目/ ProjName-TEST /解决方案名称

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆