我的 web.config 文件中有以下内容 - 它的一个片段如下所示 - 我只想加密 ADConnection 部分 - 并注意 UserID 和 Password 仅用于测试以尝试使其正常工作:
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<ADConnection
UserID="Test"
Password="Test1234"
/>
<connectionStrings>
<add name="DefaultConnection" providerName="System.Data.SqlClient" connectionString="" />
</connectionStrings>
<system.web>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />
<pages>
我正在运行以下命令的机器是 64 位 Windows Server 2008 R2。
我已经尝试了以下 - 右键单击并以管理员身份运行 CMD。
cd 到:C:\Windows\Microsoft.NET\Framework\v4.0.30319
然后我尝试了以下命令:
aspnet_regiis.exe -pef "ADConnection" C:\Users\Test\Documents\Visual Studio 2012\Projects\WebApplication
1\WebApplication1\Web.config
但是,当我按 Enter 键时,只需列出 aspnet_regiis 可以做什么的所有选项,并简要说明 aspnet_regiis 是一种管理,也用于在本地计算机上安装和卸载 ASP.NET。
有什么我错过的吗?